Thanks!
route-leaking makes user terminals(10.10.0.0/17) can access other lans.
But still I have the first problem: Router1 can’t access internet.
Here is my configuration in Router1:
# show protocols
static {
route 0.0.0.0/0 {
next-hop 10.10.192.1 {
next-hop-vrf INTERNET
}
}
route 10.10.195.0/28 {
next-hop 10.10.195.2 {
next-hop-vrf INTERNAL
}
}
route 10.10.196.0/28 {
next-hop 10.10.196.2 {
next-hop-vrf INTERNET
}
}
}
vrf INTERNAL {
static {
route 0.0.0.0/0 {
next-hop 10.10.195.2 {
}
}
route 10.10.0.0/17 {
next-hop 10.10.193.2 {
}
}
}
}
vrf INTERNET {
static {
route 0.0.0.0/0 {
next-hop 10.10.192.1 {
}
}
route 10.10.0.0/17 {
next-hop 10.10.196.2 {
}
}
route 10.10.192.2/32 {
next-hop 10.10.192.2 {
next-hop-vrf default
}
}
route 10.10.193.0/28 {
next-hop 10.10.193.2 {
next-hop-vrf INTERNAL
}
}
}
}
Then I can ping an internet ip:
$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=29.1 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=116 time=29.5 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=116 time=29.5 ms
but can’t ping an domain: Temporary failure in name resolution.
tcpdump shows Router1 response with icmp port unreachable:
tcpdump -i eth0 icmp or port 53 -nn
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
02:22:00.500385 IP 10.10.192.2.56306 > 202.96.209.5.53: 19159+ A? www.vyos.io. (29)
02:22:00.503285 IP 202.96.209.5.53 > 10.10.192.2.56306: 19159 3/0/0 CNAME cname.vercel-dns.com., A 76.76.21.61, A 76.76.21.241 (95)
02:22:00.503357 IP 10.10.192.2 > 202.96.209.5: ICMP 10.10.192.2 udp port 56306 unreachable, length 131
02:22:05.505522 IP 10.10.192.2.42130 > 202.96.209.133.53: 19159+ A? www.vyos.io. (29)
02:22:05.512819 IP 202.96.209.133.53 > 10.10.192.2.42130: 19159 3/0/0 CNAME cname.vercel-dns.com., A 76.76.21.9, A 76.76.21.241 (95)
02:22:05.512885 IP 10.10.192.2 > 202.96.209.133: ICMP 10.10.192.2 udp port 42130 unreachable, length 131
02:22:14.356836 IP 10.10.192.2 > 8.8.8.8: ICMP echo request, id 26514, seq 1, length 64
02:22:14.386432 IP 8.8.8.8 > 10.10.192.2: ICMP echo reply, id 26514, seq 1, length 64
02:22:15.358643 IP 10.10.192.2 > 8.8.8.8: ICMP echo request, id 26514, seq 2, length 64
02:22:15.388070 IP 8.8.8.8 > 10.10.192.2: ICMP echo reply, id 26514, seq 2, length 64
02:22:16.359698 IP 10.10.192.2 > 8.8.8.8: ICMP echo request, id 26514, seq 3, length 64
02:22:16.388702 IP 8.8.8.8 > 10.10.192.2: ICMP echo reply, id 26514, seq 3, length 64
I can’t even ping itself in router1:
ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.10.192.2 netmask 255.255.255.240 broadcast 10.10.192.15
inet6 fe80::4262:31ff:fe15:a987 prefixlen 64 scopeid 0x20<link>
ether 40:62:31:15:a9:87 txqueuelen 1000 (Ethernet)
RX packets 731397 bytes 239871423 (228.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 714112 bytes 159469861 (152.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xdf500000-df57ffff
vyos@vyos:/tmp$
vyos@vyos:/tmp$ ping 10.10.192.2
PING 10.10.192.2 (10.10.192.2) 56(84) bytes of data.
^C
--- 10.10.192.2 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 38ms
vyos@vyos:/tmp$ ping 10.10.192.1
PING 10.10.192.1 (10.10.192.1) 56(84) bytes of data.
64 bytes from 10.10.192.1: icmp_seq=1 ttl=64 time=0.312 ms
^C
--- 10.10.192.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.312/0.312/0.312/0.000 ms
What should I do to make Router1 self can access internet?
Thanks!