Podcast
Questions and Answers
What is the purpose of the -6
option in the route
command?
What is the purpose of the -6
option in the route
command?
What is the result of running the ping6
command without a valid route to the destination?
What is the result of running the ping6
command without a valid route to the destination?
What is the purpose of the ip route add
command?
What is the purpose of the ip route add
command?
What is the result of deleting a route from the routing table using the route -6 del
command?
What is the result of deleting a route from the routing table using the route -6 del
command?
Signup and view all the answers
What is the difference between the route
and ip route
commands?
What is the difference between the route
and ip route
commands?
Signup and view all the answers
Study Notes
Scheduling Jobs with at
- Valid time specifications for
at
include:at 08:30 AM next week
,at midday
,at now +4 days
,at tomorrow 08:30 AM
- Invalid time specifications for
at
include:at 01-01-2020 07:30 PM
,at 21:50 01.01.20
,at 10:15 PM 31/03/2021
Reviewing and Deleting at
Jobs
- To review
at
job commands, useat -c
- To review pending
at
jobs, useat -l
oratq
- To delete
at
jobs, useat -d
oratrm
Using systemd-run
as an Alternative to at
-
systemd-run
can be used to schedule one-time jobs, similar toat
- Example:
# systemd-run --on-calendar='2019-10-06 11:30' date
to run thedate
command at 11:30 AM on 2019/10/06 - Example:
# systemd-run --on-active="2m" ./foo.sh
to run thefoo.sh
script after 2 minutes
Reviewing systemd-run
Logs
-
systemd-run
logs are stored in the systemd journal - To review logs, use the
journalctl
command
Viewing Routing Tables
-
netstat -r
,ip route
, androute
commands are used to view the routing table. - The output of these commands displays the destination, gateway, genmask, flags, and interface.
- The
ip route
command does not show IPv6 routes by default; useip -6 route
to view IPv6 routes. - The
route -6
andnetstat -6r
commands are used to view IPv6 routing tables.
Flags Column
- The
U
flag indicates that a route is up. - The
!
flag means reject route, i.e., a route with a!
won't be used. - The
n
flag means the route hasn't been cached. - The
G
flag indicates a gateway.
Metric or Met Column
- The Metric or Met column refers to the administrative distance to the target.
- This administrative distance is used by routing protocols to determine dynamic routes.
Adding and Deleting Routes
- The
route -6 add
andip route add
commands are used to add routes. - The
route -6 del
andip route del
commands are used to delete routes. - Adding a route can make a network reachable, while deleting a route can make a network unreachable.
Guided Exercises
- The
ip link
andip addr
commands can be used to list network interfaces. - An interface can be temporarily disabled using the
ip link set dev down
command and re-enabled using theip link set dev up
command. - A reasonable subnet mask for IPv4 is 255.255.255.0.
- The
netstat -r
,ip route
, androute
commands can be used to verify the default route. - A second IP address can be added to an interface using the
ip addr add
command.
Explorational Exercises
- The
ip link add
command can be used to configure VLAN tagging. - A default route can be configured using the
ip route add
command. - Detailed information about the
ip neighbour
command can be obtained using theip neighbour help
command.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Learn to automate system administration tasks by scheduling jobs using the at command in Linux. Practice exercises to master LPIC-1 certification.