若膊∞ Linux泣若

maya
篁ャLinux泣若 若膊∞ ゃ荅宴

 

若膊∞

maya
若荐絎絎篁荐絎絎鴻罩c絎篆<с腆肴

nao
篁羂ゃ篋鐚

maya
絎鴻CentOS7篁ラсCentOS6篁ュOSс潟潟篏違ф絵

 

ip 潟潟

maya
ip潟潟篏帥c障IP≪鴻荐絎腆肴

 

1鐚 IP≪鴻腆肴

# [guest@centos7 ~]$ ip address
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: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.158/24 brd 192.168.10.255 scope global dynamic enp0s8
       valid_lft 75517sec preferred_lft 75517sec
    inet6 fe80::****:****:****:****/64 scope link 
       valid_lft forever preferred_lft forever
4: enp0s10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
    inet 172.16.32.100/24 brd 172.16.32.255 scope global enp0s10
       valid_lft forever preferred_lft forever
    inet6 fe80::****:****:****:****/64 scope link 
       valid_lft forever preferred_lft forever

 

nao
enp0s10荐絎IP≪鴻172.16.32.100腆肴с

maya
潟潟ip aュс腟茵腓冴

nao

maya
膓蚊若сゃ腆肴ip潟潟篏帥

 

2鐚 蚊若сゃ腆肴

[guest@centos7 ~]$ ip route
default via 172.16.32.1 dev enp0s10 proto static metric 100
default via 192.168.1.1 dev enp0s8 proto static metric 101
172.16.32.0/24 dev enp0s10 proto kernel scope link src 172.16.32.100 metric 100
192.168.1.0/24 dev enp0s8 proto kernel scope link src 192.168.1.31 metric 100

 

nao
default via 172.16.32.1 茵腓冴

maya
荐絎蚊若сゃ≪鴻<帥潟潟蚊若сゃс鴻若宴茵腓冴潟潟

nao
若縁

maya
荐絎с蚊若сゃ茹c若ヨ綽荀篁ip route с蚊若сゃ腆肴с荀

nao

 

ping 潟潟

maya
膓蚊若сゃ篆<茵腆肴

 

1鐚 ping潟潟ч篆∞∈茯茵

[guest@centos7 ~]$ ping 172.16.32.1
PING 172.16.32.1 (172.16.32.1) 56(84) bytes of data.
64 bytes from 172.16.32.1: icmp_seq=1 ttl=64 time=1.79 ms
64 bytes from 172.16.32.1: icmp_seq=2 ttl=64 time=3.26 ms
64 bytes from 172.16.32.1: icmp_seq=3 ttl=64 time=1.84 ms
 :
 :

 

nao
c<祉若吾膓

maya
Linux泣若ping潟潟[Ctrl]+[c]ュ罩≪

 

2. [Ctrl]+[c]ュ

[guest@centos7 ~]$ ping 172.16.32.1
PING 172.16.32.1 (172.16.32.1) 56(84) bytes of data.
64 bytes from 172.16.32.1: icmp_seq=1 ttl=64 time=1.79 ms
64 bytes from 172.16.32.1: icmp_seq=2 ttl=64 time=3.26 ms
64 bytes from 172.16.32.1: icmp_seq=3 ttl=64 time=1.84 ms
64 bytes from 172.16.32.1: icmp_seq=4 ttl=64 time=1.28 ms
64 bytes from 172.16.32.1: icmp_seq=5 ttl=64 time=1.42 ms
[Ctrl]+[c]
--- 172.16.32.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4008ms
rtt min/avg/max/mdev = 1.283/1.922/3.263/0.705 ms

 

nao
罩≪緇<祉若吾茵腓冴

maya
箴с”5 packets transmitted, 5 received鐚5ゃ宴篆<5ゃ宴篆<鐚”фe幻篆<с

nao
紊掩鐚

maya
荀帥

 

3鐚 ping潟潟ч篆∞∈茯茵

[guest@centos7 ~]$ ping 172.16.32.2
PING 172.16.32.2 (172.16.32.2) 56(84) bytes of data.
From 172.16.32.100 icmp_seq=1 Destination Host Unreachable
From 172.16.32.100 icmp_seq=2 Destination Host Unreachable
From 172.16.32.100 icmp_seq=3 Destination Host Unreachable
From 172.16.32.100 icmp_seq=4 Destination Host Unreachable
[Ctrl]+[c]
--- 172.16.32.2 ping statistics ---
5 packets transmitted, 0 received, +4 errors, 100% packet loss, time 4001ms pipe 4

 

maya
箴с”5 packets transmitted, 0 received, +4 errors鐚5ゃ宴篆<0ゃ宴篆<4や札筝若鐚”ч篆<сc

nao
筝<祉若吾違

maya
”64 bytes from 172.16.32.1: icmp_seq=1 ttl=64 time=1.79 ms”c紊掩”From 172.16.32.100 icmp_seq=1 Destination Host Unreachable”茵腓冴絎鴻сゆс

nao
鐚鐚鐚

maya
”time=1.79 ms”1.79腱ц膈c<祉若吾紊掩”Destination Host Unreachable”絎鴻亥сc茵腓冴

nao
篁絎鴻亥сc篏с鐚

maya
若c莖篆∞御罘<c荐絎宴若蚊

nao
祉11ょ∈茯鏆荀

maya
ヨ鴻腟薑綽荀<祉若吾絎括劫с違腴羇障潟吾≪

nao
障障激с

maya
羂篋腱篏1ょャc堺ャc11よ絎荅帥c腟薑c

nao

 

nmcli 潟潟

maya
膓鴻腆肴腆肴潟潟緇膺若絎純

 

1鐚 鴻腆肴

# [guest@centos7 ~]$ nmcli g hostname
centos7.localdomain

 

nao
鴻茵腓冴

 

篁鐚arp,netstat鐚

maya
篁障篏ャ若膊∞≪潟潟2ょ換篁

 

1. arpc激ャ腆肴

[guest@centos7 ~]$ ip neigh
192.168.1.1 dev enp0s8   lladdr **:**:**:**:**:** STALE
172.32.16.1 dev enp0s10  lladdr **:**:**:**:**:** STALE
172.32.16.2 dev enp0s10  FAILED

 

maya
arp潟潟臀т戎

 

2. 篆<若腆肴

[guest@centos7 ~]$ ss -at
State      Recv-Q Send-Q Local Address:Port        Peer Address:Port
LISTEN     0      128        *:ssh                     *:*
LISTEN     0      100    127.0.0.1:smtp                *:*
ESTAB      0      96     192.168.1.31:ssh          192.168.1.26:50095
LISTEN     0      128       :::ssh                     :::*
LISTEN     0      100      ::1:smtp                    :::*

 

maya
netstat潟潟臀т戎若腆肴潟潟篁紊若鐚ャ篋紊т

nao
若罘紕宴若х羞宴

maya
羞宴若ラ膩篏篋絎с綣激帥с篁障ャ

 

  • ip潟潟IP≪鴻蚊若сゃ腆肴
  • ping潟潟ч篆<с腆肴
  • nmcli潟潟с鴻腆肴

 

鐚鐚若祉鐚鐚