default route
vermaden
vermaden at interia.pl
Fri Dec 14 02:58:49 PST 2007
> Fri, Dec 14, 2007 at 11:20:32AM +0100, vermaden wrote:
> > I already used tcpdump, if ICMP packet goes in thru 192.168/16 on rl1
> the
> > response goes out on 10/24 on rl0.
>
> And the destination MAC address of the ICMP reply that is going
> through rl0 is?
>
> What if you'll do two experiments: drop the default route and change
> it to something in the 192.168/16? Will ping results be the same
> or packets will be thrown out through another interfaces?
>
> What FreeBSD version you're using?
> --
> Eygene
FreeBSD 6.3-PRERELEASE built from sources from a week ago, but after RC1 for sure.
zenek# uname -a
FreeBSD zenek 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #0: Mon Nov 26 13:20:01 CET 2007 vermaden at siewa:/usr/obj/usr/src/sys/CUSTOM i386
CUSTOM is GENERIC with removed makeoptions DEBUG=-g and removed cpu I486_CPU and cpu I586_CPU.
BTW: I changed 192.168.0.0/16 to 169.254.169/24 which most hosts use in my network.
zenek# netstat -rfinet
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 10.0.0.1 UGS 0 716450 rl0
10/24 link#1 UC 0 0 rl0
10.0.0.1 00:90:27:5d:f7:3b UHLW 2 18729 rl0 963
10.0.0.2 00:15:17:23:c0:8a UHLW 1 353 rl0 999
10.0.0.7 00:e0:18:0d:d3:3d UHLW 1 3479223 rl0 1195
10.0.0.107 00:90:27:77:fd:98 UHLW 1 39945 rl0 715
10.0.0.119 00:02:b3:d0:bc:6a UHLW 1 96 rl0 821
localhost localhost UH 0 14 lo0
169.254.169/24 link#2 UC 0 0 rl1
169.254.169.24 00:06:29:99:02:9d UHLW 1 845 rl1 1099
169.254.169.44 00:90:cc:b6:18:1f UHLW 1 4 rl1 775
169.254.169.45 00:90:cc:c4:21:25 UHLW 1 6 rl1 584
zenek# ifconfig
rl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
inet 10.0.0.71 netmask 0xffffff00 broadcast 10.0.0.255
ether 00:90:cc:de:5e:0c
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
rl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
inet 169.254.169.171 netmask 0xffffff00 broadcast 169.254.169.255
ether 00:02:44:51:ae:80
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
zenek# route add default 169.254.169
route: writing to routing socket: File exists
add net default: gateway 169.254.169: route already in table
zenek# route add default 169.254.169.1
route: writing to routing socket: File exists
add net default: gateway 169.254.169.1: route already in table
When I ping 169.254.169.24 (Linux) from 169.254.169.171 (my FreeBSD box) I get that on rl1:
zenek# tcpdump -lvvni rl1 icmp
tcpdump: listening on rl1, link-type EN10MB (Ethernet), capture size 96 bytes
11:38:44.269250 IP (tos 0x0, ttl 64, id 6670, offset 0, flags [none], proto: ICMP (1), length: 84) 169.254.169.171 > 169.254.169.24: ICMP echo request, id 64923, seq 96, length 64
11:38:44.270445 IP (tos 0x0, ttl 64, id 9072, offset 0, flags [none], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo reply, id 64923, seq 96, length 64
11:38:45.283470 IP (tos 0x0, ttl 64, id 7317, offset 0, flags [none], proto: ICMP (1), length: 84) 169.254.169.171 > 169.254.169.24: ICMP echo request, id 64923, seq 97, length 64
11:38:45.284662 IP (tos 0x0, ttl 64, id 9073, offset 0, flags [none], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo reply, id 64923, seq 97, length 64
11:38:46.299274 IP (tos 0x0, ttl 64, id 8097, offset 0, flags [none], proto: ICMP (1), length: 84) 169.254.169.171 > 169.254.169.24: ICMP echo request, id 64923, seq 98, length 64
11:38:46.299398 IP (tos 0x0, ttl 64, id 9074, offset 0, flags [none], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo reply, id 64923, seq 98, length 64
11:38:47.312169 IP (tos 0x0, ttl 64, id 9030, offset 0, flags [none], proto: ICMP (1), length: 84) 169.254.169.171 > 169.254.169.24: ICMP echo request, id 64923, seq 99, length 64
11:38:47.313374 IP (tos 0x0, ttl 64, id 9075, offset 0, flags [none], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo reply, id 64923, seq 99, length 64
^C
8 packets captured
12 packets received by filter
0 packets dropped by kernel
zenek# tcpdump -lvvni rl1 arp
tcpdump: listening on rl1, link-type EN10MB (Ethernet), capture size 96 bytes
11:38:53.320435 arp who-has 169.254.169.171 tell 169.254.169.24
11:38:53.320454 arp reply 169.254.169.171 is-at 00:02:44:51:ae:80
11:38:55.004282 arp who-has 169.254.169.1 tell 169.254.169.251
11:38:58.009399 arp who-has 169.254.169.1 tell 169.254.169.251
11:38:58.335180 arp who-has 169.254.169.171 tell 169.254.169.24
11:38:58.335194 arp reply 169.254.169.171 is-at 00:02:44:51:ae:80
11:39:01.015256 arp who-has 169.254.169.1 tell 169.254.169.251
11:39:03.354950 arp who-has 169.254.169.171 tell 169.254.169.24
11:39:03.354975 arp reply 169.254.169.171 is-at 00:02:44:51:ae:80
When I ping 169.254.169.171 (my FreeBSD box) from 169.254.169.24 (Linux) I get this:
zenek# tcpdump -lvvni rl1 icmp
tcpdump: listening on rl1, link-type EN10MB (Ethernet), capture size 96 bytes
11:43:41.451446 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 58691, seq 14, length 64
11:43:42.451201 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 58691, seq 15, length 64
11:43:43.450948 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 58691, seq 16, length 64
11:43:44.450697 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 58691, seq 17, length 64
11:43:45.450456 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 58691, seq 18, length 64
11:43:46.450199 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 58691, seq 19, length 64
^C
7 packets captured
11 packets received by filter
0 packets dropped by kernel
zenek# tcpdump -lvvni rl1 arp
tcpdump: listening on rl1, link-type EN10MB (Ethernet), capture size 96 bytes
11:43:59.836991 arp who-has 169.254.169.1 tell 169.254.169.251
11:44:00.447690 arp who-has 169.254.169.171 tell 169.254.169.24
11:44:00.447752 arp reply 169.254.169.171 is-at 00:02:44:51:ae:80
11:44:02.843485 arp who-has 169.254.169.1 tell 169.254.169.251
11:44:05.848340 arp who-has 169.254.169.1 tell 169.254.169.251
11:44:06.446182 arp who-has 169.254.169.171 tell 169.254.169.24
11:44:06.446215 arp reply 169.254.169.171 is-at 00:02:44:51:ae:80
11:44:08.853626 arp who-has 169.254.169.1 tell 169.254.169.251
11:44:11.861778 arp who-has 169.254.169.1 tell 169.254.169.251
11:44:12.445681 arp who-has 169.254.169.171 tell 169.254.169.24
11:44:12.445697 arp reply 169.254.169.171 is-at 00:02:44:51:ae:80
11:44:13.022591 arp who-has 169.254.169.111 tell 169.254.169.25
For Both FreBSD --> Linux ping and Linux --> FreeBSD ping the tcpdump -lvvni rl1 arp
and tcpdump -lvvni rl1 icmp commands does not show any packets.
zenek# route delete default
delete net default
zenek# route add default 169.254.169.1
add net default: gateway 169.254.169.1
zenek# netstat -rfinet
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 169.254.169.1 UGS 0 0 rl1
10/24 link#1 UC 0 0 rl0
10.0.0.1 00:90:27:5d:f7:3b UHLW 1 18729 rl0 1032
10.0.0.2 00:15:17:23:c0:8a UHLW 1 353 rl0 744
10.0.0.7 00:e0:18:0d:d3:3d UHLW 1 3614982 rl0 1180
10.0.0.107 00:90:27:77:fd:98 UHLW 1 47136 rl0 460
10.0.0.119 00:02:b3:d0:bc:6a UHLW 1 96 rl0 567
localhost localhost UH 0 14 lo0
169.254.169/24 link#2 UC 0 0 rl1
169.254.169.1 link#2 UHLW 2 0 rl1
169.254.169.24 00:06:29:99:02:9d UHLW 1 863 rl1 1197
169.254.169.44 00:90:cc:b6:18:1f UHLW 1 4 rl1 1123
169.254.169.45 00:90:cc:c4:21:25 UHLW 1 6 rl1 330
169.254.169.171 00:02:44:51:ae:80 UHLW 1 0 lo0
zenek# tcpdump -lvvni rl1 icmp
tcpdump: listening on rl1, link-type EN10MB (Ethernet), capture size 96 bytes
11:55:26.992028 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 17, length 64
11:55:27.991774 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 18, length 64
11:55:28.755811 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.25 > 169.254.169.102: ICMP echo request, id 49508, seq 0, length 64
11:55:28.991538 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 19, length 64
11:55:29.991277 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 20, length 64
11:55:30.991025 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 21, length 64
11:55:31.990778 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 22, length 64
11:55:32.990530 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 23, length 64
11:55:33.990275 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 24, length 64
11:55:34.990028 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 25, length 64
11:55:35.111973 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.25 > 169.254.169.108: ICMP echo request, id 52580, seq 1024, length 64
11:55:35.531991 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.25 > 169.254.169.106: ICMP echo request, id 52580, seq 7680, length 64
11:55:35.932022 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.25 > 169.254.169.104: ICMP echo request, id 52580, seq 14336, length 64
11:55:35.934160 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.25 > 169.254.169.104: ICMP echo request, id 52580, seq 14336, length 64
11:55:35.989777 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 26, length 64
11:55:36.592069 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.25 > 169.254.169.114: ICMP echo request, id 52580, seq 25088, length 64
11:55:36.989532 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 27, length 64
11:55:37.990277 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 28, length 64
11:55:38.990028 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 29, length 64
11:55:39.989777 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 30, length 64
11:55:40.989529 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 31, length 64
11:55:41.989280 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 59972, seq 32, length 64
11:55:43.858700 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 6725, seq 1, length 64
11:55:44.858565 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 6725, seq 2, length 64
11:55:45.858313 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 6725, seq 3, length 64
11:55:46.858063 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 6725, seq 4, length 64
11:55:47.857815 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 6725, seq 5, length 64
11:55:48.857560 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 6725, seq 6, length 64
11:55:49.857312 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 6725, seq 7, length 64
11:55:50.857061 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 6725, seq 8, length 64
11:55:51.856811 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: ICMP (1), length: 84) 169.254.169.24 > 169.254.169.171: ICMP echo request, id 6725, seq 9, length 64
^C
31 packets captured
71 packets received by filter
0 packets dropped by kernel
zenek# tcpdump -lvvni rl1 arp
tcpdump: listening on rl1, link-type EN10MB (Ethernet), capture size 96 bytes
11:55:55.856789 arp who-has 169.254.169.171 tell 169.254.169.24
11:55:55.856835 arp reply 169.254.169.171 is-at 00:02:44:51:ae:80
11:55:57.693579 arp who-has 169.254.169.110 tell 169.254.169.25
11:55:58.429370 arp who-has 169.254.169.1 tell 169.254.169.251
11:55:58.693651 arp who-has 169.254.169.110 tell 169.254.169.25
11:55:59.693722 arp who-has 169.254.169.110 tell 169.254.169.25
11:56:01.437132 arp who-has 169.254.169.1 tell 169.254.169.251
11:56:01.745871 arp who-has 169.254.169.110 tell 169.254.169.25
11:56:01.855291 arp who-has 169.254.169.171 tell 169.254.169.24
11:56:01.855334 arp reply 169.254.169.171 is-at 00:02:44:51:ae:80
11:56:02.745943 arp who-has 169.254.169.110 tell 169.254.169.25
11:56:03.746020 arp who-has 169.254.169.110 tell 169.254.169.25
11:56:04.443491 arp who-has 169.254.169.1 tell 169.254.169.251
11:56:05.922217 arp who-has 169.254.169.110 tell 169.254.169.25
11:56:06.922271 arp who-has 169.254.169.110 tell 169.254.169.25
11:56:07.450864 arp who-has 169.254.169.1 tell 169.254.169.251
11:56:07.854791 arp who-has 169.254.169.171 tell 169.254.169.24
11:56:07.854810 arp reply 169.254.169.171 is-at 00:02:44:51:ae:80
tcpdump on rl0 still nothing.
My question here, maybe I do something wrong here, maybe tell me what way it should
be done to achieve the proper behaviour, thanks in advance for any suggestions.
Regards
veramden
----------------------------------------------------------------------
Nie masz pomyslu na smaczne danie?
Mnostwo smacznych przepisow na http://link.interia.pl/f1cac
More information about the freebsd-net
mailing list