network ip route | ethtool eth0 | ip a | route | ip addr add dev ens33 10.0.0.8/24 | ip route add 20.0.0.0/8 via 192.168.174.131 | ifconfig -a
BIOS naming based on hardware properties
em[1-N] for embedded NICs
p<slot_num>p<port_num>
Udev naming: classical ethX naming
Logical naming: <vlan> and :<alias>
----------------------------------------------------
ifconfig is obsolete and shouldn't be used anymore
----------------------------------------------------
ethtool eth0
Look at the last line; it should say:
Link detected: yes
----------------------------------------------------
centos@192 ~]$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
link/ether 00:0c:29:17:b4:58 brd ff:ff:ff:ff:ff:ff
[centos@192 ~]$
----------------------------------------------------
[centos@192 ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:17:b4:58 brd ff:ff:ff:ff:ff:ff
inet 192.168.174.131/24 brd 192.168.174.255 scope global dynamic ens33
valid_lft 1293sec preferred_lft 1293sec
inet6 fe80::20c:29ff:fe17:b458/64 scope link
valid_lft forever preferred_lft forever
[centos@192 ~]$
----------------------------------------------------
----------------------------------------------------
----------------------------------------------------
No secondary address for ifconfig command
[root@localhost ~]# ifconfig -a
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.174.131 netmask 255.255.255.0 broadcast 192.168.174.255
inet6 fe80::20c:29ff:fe17:b458 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:17:b4:58 txqueuelen 1000 (Ethernet)
RX packets 55005 bytes 64763900 (61.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 31976 bytes 2760752 (2.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 159 bytes 13974 (13.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 159 bytes 13974 (13.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@localhost ~]# ip route add 20.0.0.0/8 via 192.168.174.131
[root@localhost ~]# ip route
default via 192.168.174.2 dev ens33 proto static metric 100
10.0.0.0/24 dev ens33 proto kernel scope link src 10.0.0.8
20.0.0.0/8 via 192.168.174.131 dev ens33
192.168.174.0/24 dev ens33 proto kernel scope link src 192.168.174.131 metric 100
[root@localhost ~]#
em[1-N] for embedded NICs
p<slot_num>p<port_num>
Udev naming: classical ethX naming
Logical naming: <vlan> and :<alias>
----------------------------------------------------
ifconfig is obsolete and shouldn't be used anymore
----------------------------------------------------
ethtool eth0
Look at the last line; it should say:
Link detected: yes
----------------------------------------------------
centos@192 ~]$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
link/ether 00:0c:29:17:b4:58 brd ff:ff:ff:ff:ff:ff
[centos@192 ~]$
----------------------------------------------------
[centos@192 ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:17:b4:58 brd ff:ff:ff:ff:ff:ff
inet 192.168.174.131/24 brd 192.168.174.255 scope global dynamic ens33
valid_lft 1293sec preferred_lft 1293sec
inet6 fe80::20c:29ff:fe17:b458/64 scope link
valid_lft forever preferred_lft forever
[centos@192 ~]$
----------------------------------------------------
Find your gateway address. your gateway should show up
at the top of the output. Note, the route command taking a long time to complete
is also a sign the connection is down
at the top of the output. Note, the route command taking a long time to complete
is also a sign the connection is down
centos@192 ~]$ ip route
default via 192.168.174.2 dev ens33 proto static metric 100
192.168.174.0/24 dev ens33 proto kernel scope link src 192.168.174.131 metric 100
----------------------------------------------------
[root@localhost ~]# ip addr add dev ens33 10.0.0.8/24
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:17:b4:58 brd ff:ff:ff:ff:ff:ff
inet 192.168.174.131/24 brd 192.168.174.255 scope global dynamic ens33
valid_lft 1742sec preferred_lft 1742sec
inet 10.0.0.8/24 scope global ens33
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe17:b458/64 scope link
valid_lft forever preferred_lft forever
[root@localhost ~]#
No secondary address for ifconfig command
[root@localhost ~]# ifconfig -a
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.174.131 netmask 255.255.255.0 broadcast 192.168.174.255
inet6 fe80::20c:29ff:fe17:b458 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:17:b4:58 txqueuelen 1000 (Ethernet)
RX packets 55005 bytes 64763900 (61.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 31976 bytes 2760752 (2.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 159 bytes 13974 (13.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 159 bytes 13974 (13.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@localhost ~]# ip route
default via 192.168.174.2 dev ens33 proto static metric 100
10.0.0.0/24 dev ens33 proto kernel scope link src 10.0.0.8
20.0.0.0/8 via 192.168.174.131 dev ens33
192.168.174.0/24 dev ens33 proto kernel scope link src 192.168.174.131 metric 100
[root@localhost ~]#
Comments
Post a Comment