LINUX.ORG.RU

VLAN ip addr add arping

 


0

1

Добрый день. Вот собственно и вопрос - куда пропал пинг до DL101 из всей подсетки 10.133.10.0? куда копать подскажите. На сервере DL202 удалил IP

DL202
ip addr del 10.133.10.180/24 dev vlan723

И добавил его на сервер DL101

ip addr add 10.133.10.180/24 broadcast 10.133.10.255 dev vlan723 label vlan723:hanapfs
ip route add default via 10.133.10.1 table 108
ip rule add from 10.133.10.180 table 108
arping -c 4 -A -I vlan723 10.133.10.180

После этого начались проблемы. С любого сервера из сетки 10.133.10.0 перестал пинговаться один сервер DL101. Вся сопутствующая инфа ниже. Мне какжется вся проблема в строке:

ip route add default via 10.133.10.1 table 108

[cut]

DL202
ip addr del 10.133.10.180/24 dev vlan723

# nslookup DL202
Name:   DL202
Address: 10.133.10.22

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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
6: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 8c:dc:d4:11:ff:f0 brd ff:ff:ff:ff:ff:ff
7: eth4: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 8c:dc:d4:11:ff:f0 brd ff:ff:ff:ff:ff:ff
8: eth5: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 8c:dc:d4:11:ff:f0 brd ff:ff:ff:ff:ff:ff
9: eth6: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 8c:dc:d4:11:ff:f0 brd ff:ff:ff:ff:ff:ff
10: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 8c:dc:d4:11:ff:f0 brd ff:ff:ff:ff:ff:ff
11: vlan730@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 8c:dc:d4:11:ff:f0 brd ff:ff:ff:ff:ff:ff
    inet 10.133.21.22/24 brd 10.133.21.255 scope global vlan730
       valid_lft forever preferred_lft forever
12: vlan741@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 8c:dc:d4:11:ff:f0 brd ff:ff:ff:ff:ff:ff
    inet 10.133.41.22/24 brd 10.133.41.255 scope global vlan741
       valid_lft forever preferred_lft forever
13: vlan723@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 8c:dc:d4:11:ff:f0 brd ff:ff:ff:ff:ff:ff
    inet 10.133.10.22/24 brd 10.133.10.255 scope global vlan723
       valid_lft forever preferred_lft forever
    inet 10.133.10.16/24 brd 10.133.10.255 scope global secondary vlan723:hanahis
       valid_lft forever preferred_lft forever
    inet 10.133.10.179/24 brd 10.133.10.255 scope global secondary vlan723:hanadfs
       valid_lft forever preferred_lft forever
	   
# ip rule
0:      from all lookup local
32766:  from all lookup main
32767:  from all lookup default

# ip route
default via 10.133.10.1 dev vlan723
10.133.10.0/24 dev vlan723 proto kernel scope link src 10.133.10.22
10.133.21.0/24 dev vlan730 proto kernel scope link src 10.133.21.22
10.133.41.0/24 dev vlan741 proto kernel scope link src 10.133.41.22

# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.133.10.1     0.0.0.0         UG        0 0          0 vlan723
10.133.10.0     0.0.0.0         255.255.255.0   U         0 0          0 vlan723
10.133.21.0     0.0.0.0         255.255.255.0   U         0 0          0 vlan730
10.133.41.0     0.0.0.0         255.255.255.0   U         0 0          0 vlan741

[/cut]

Пинга до DL101 нет, а он был (Вообще с любого сервера из подсетки 10.133.10.0 нет пинга до dl101)

# ping dl101
PING DL101.sgc.oil.gas (10.133.12.11) 56(84) bytes of data.
^C
--- DL101.sgc.oil.gas ping statistics ---
18 packets transmitted, 0 received, 100% packet loss, time 17413ms

[cut]

DL101
ip addr add 10.133.10.180/24 broadcast 10.133.10.255 dev vlan723 label vlan723:hanapfs
ip route add default via 10.133.10.1 table 108
ip rule add from 10.133.10.180 table 108
arping -c 4 -A -I vlan723 10.133.10.180
# nslookup DL101
Name:   DL101
Address: 10.133.12.11

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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
2: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 28:80:23:b4:9e:70 brd ff:ff:ff:ff:ff:ff
3: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 28:80:23:b4:9e:71 brd ff:ff:ff:ff:ff:ff
4: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 8c:dc:d4:12:10:38 brd ff:ff:ff:ff:ff:ff
5: eth6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 28:80:23:b4:9e:72 brd ff:ff:ff:ff:ff:ff
6: eth7: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 28:80:23:b4:9e:73 brd ff:ff:ff:ff:ff:ff
7: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 8c:dc:d4:12:10:38 brd ff:ff:ff:ff:ff:ff
8: eth3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 8c:dc:d4:12:10:38 brd ff:ff:ff:ff:ff:ff
9: eth4: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 8c:dc:d4:12:10:38 brd ff:ff:ff:ff:ff:ff
10: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 8c:dc:d4:12:10:38 brd ff:ff:ff:ff:ff:ff
11: vlan731@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 8c:dc:d4:12:10:38 brd ff:ff:ff:ff:ff:ff
    inet 10.133.22.12/24 brd 10.133.22.255 scope global vlan731
       valid_lft forever preferred_lft forever
12: vlan741@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 8c:dc:d4:12:10:38 brd ff:ff:ff:ff:ff:ff
    inet 10.133.41.11/24 brd 10.133.41.255 scope global vlan741
       valid_lft forever preferred_lft forever
13: vlan723@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 8c:dc:d4:12:10:38 brd ff:ff:ff:ff:ff:ff
    inet 10.133.10.180/24 brd 10.133.10.255 scope global vlan723:hanapfs
       valid_lft forever preferred_lft forever
14: vlan725@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 8c:dc:d4:12:10:38 brd ff:ff:ff:ff:ff:ff
    inet 10.133.12.11/24 brd 10.133.12.255 scope global vlan725
       valid_lft forever preferred_lft forever
    inet 10.133.12.121/24 brd 10.133.12.255 scope global secondary vlan725:hanar3d
       valid_lft forever preferred_lft forever
    inet 10.133.12.136/24 brd 10.133.12.255 scope global secondary vlan725:hanasfd
       valid_lft forever preferred_lft forever

# ip rule
0:      from all lookup local
32765:  from 10.133.10.180 lookup 108
32766:  from all lookup main
32767:  from all lookup default

# ip route
default via 10.133.12.1 dev vlan725
10.133.10.0/24 dev vlan723 proto kernel scope link src 10.133.10.180
10.133.12.0/24 dev vlan725 proto kernel scope link src 10.133.12.11
10.133.22.0/24 dev vlan731 proto kernel scope link src 10.133.22.12
10.133.41.0/24 dev vlan741 proto kernel scope link src 10.133.41.11

# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.133.12.1     0.0.0.0         UG        0 0          0 vlan725
10.133.10.0     0.0.0.0         255.255.255.0   U         0 0          0 vlan723
10.133.12.0     0.0.0.0         255.255.255.0   U         0 0          0 vlan725
10.133.22.0     0.0.0.0         255.255.255.0   U         0 0          0 vlan731
10.133.41.0     0.0.0.0         255.255.255.0   U         0 0          0 vlan741

[/cut]


При добавлении адреса DL101 начинает слать ответы напрямую, через vlan723, а получает он их, наверное, через vlan725. Может rp_filter на DL102, может правила в iptables на DL101...

Вы привели кучу текста, но нет данных по прохождению пакетов, посмотрите tcpdump'ом что происходит. Приходит ли icmp пакет на DL101 и на какой интерфейс, уходит ли icmp пакет, и с какого интерфейса?

mky ★★★★★ ()
Ответ на: комментарий от mky
  1. не идет пинг со всех серверов 10.133.10.Х до одного DL101. С другими серверами вообще не работали, делаю вывод, что проблема конкретно на самом DL101.

DL202 (10.133.10.22) - с него пускаю пинг

# tcpdump -i any -c 5 -nn icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
10:32:45.996212 IP 10.133.10.22 > 10.133.12.11: ICMP echo request, id 35261, seq 33, length 64
10:32:45.996222 ethertype IPv4, IP 10.133.10.22 > 10.133.12.11: ICMP echo request, id 35261, seq 33, length 64
10:32:45.996224 ethertype IPv4, IP 10.133.10.22 > 10.133.12.11: ICMP echo request, id 35261, seq 33, length 64
10:32:47.020184 IP 10.133.10.22 > 10.133.12.11: ICMP echo request, id 35261, seq 34, length 64
10:32:47.020188 ethertype IPv4, IP 10.133.10.22 > 10.133.12.11: ICMP echo request, id 35261, seq 34, length 64
5 packets captured
6 packets received by filter
0 packets dropped by kernel

DL101 (10.133.12.11) - на него должен прийти пинг

# tcpdump -i any -c 5 -nn icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
10:32:17.324426 ethertype IPv4, IP 10.133.10.22 > 10.133.12.11: ICMP echo request, id 35261, seq 5, length 64
10:32:17.324426 ethertype IPv4, IP 10.133.10.22 > 10.133.12.11: ICMP echo request, id 35261, seq 5, length 64
10:32:17.324426 IP 10.133.10.22 > 10.133.12.11: ICMP echo request, id 35261, seq 5, length 64
10:32:18.348785 ethertype IPv4, IP 10.133.10.22 > 10.133.12.11: ICMP echo request, id 35261, seq 6, length 64
10:32:18.348785 ethertype IPv4, IP 10.133.10.22 > 10.133.12.11: ICMP echo request, id 35261, seq 6, length 64
5 packets captured
6 packets received by filter
0 packets dropped by kernel

Расширенный вывод
# tcpdump -i any -vv -c 5 -nn src 10.133.10.22
tcpdump: listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
10:48:10.443654 ethertype IPv4, IP (tos 0x0, ttl 64, id 894, offset 0, flags [none], proto ICMP (1), length 84)
    10.133.10.22 > 10.133.10.180: ICMP echo reply, id 59405, seq 10, length 64
10:48:10.443654 ethertype IPv4, IP (tos 0x0, ttl 64, id 894, offset 0, flags [none], proto ICMP (1), length 84)
    10.133.10.22 > 10.133.10.180: ICMP echo reply, id 59405, seq 10, length 64
10:48:10.443654 IP (tos 0x0, ttl 64, id 894, offset 0, flags [none], proto ICMP (1), length 84)
    10.133.10.22 > 10.133.10.180: ICMP echo reply, id 59405, seq 10, length 64
10:48:10.476291 ethertype IPv4, IP (tos 0x0, ttl 63, id 27559, offset 0, flags [DF], proto ICMP (1), length 84)
    10.133.10.22 > 10.133.12.11: ICMP echo request, id 58612, seq 10, length 64
10:48:10.476291 ethertype IPv4, IP (tos 0x0, ttl 63, id 27559, offset 0, flags [DF], proto ICMP (1), length 84)
    10.133.10.22 > 10.133.12.11: ICMP echo request, id 58612, seq 10, length 64
5 packets captured
12 packets received by filter
0 packets dropped by kernel


Shinma ()
Последнее исправление: Shinma (всего исправлений: 1)

На тестовой машинке с основным адресом 10.133.14.17 поднимаю адрес 10.133.10.244 и пинг пропадает до этого сервера по его основному адресу 10.133.14.17 со всех серверов из 10.133.10.Х подсети.

ip addr add 10.133.10.244/24 broadcast 10.133.10.255 dev vlan723 label vlan723:hanapfs

как только удалю адрес сразу все восстанавливается

ip addr del 10.133.10.244/24 dev vlan723

Что надо добавить в эту процедуру?

Shinma ()
Ответ на: комментарий от Shinma

Придумал решение:

ip addr add 10.133.10.244/24 broadcast 10.133.10.255 dev vlan723 label vlan723:hanapfs
ip route replace default via 10.133.14.1  table 101
ip rule add from 10.133.14.17 table 101
ip route add default via 10.133.10.1 table 102
ip rule add from 10.133.10.244 table 102
arping -c 4 -A -I vlan723 10.133.10.244
Shinma ()
Для того чтобы оставить комментарий войдите или зарегистрируйтесь.