Downloading https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/Packages.gz *** Failed to download the package list from https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/Packages.gz
E(e): It maps to RTF_EXPIRES. It means the route has a non-infinite lifetime. In this case, the kernel probably learned the route dynamically from a RA (Router Advertisement).
这个路由其实是动态广播的, 那么这个现象就跟一个参数有关了
net.ipv6.conf.interface.accept_ra
Accept Router Advertisements; autoconfigure using them.
It also determines whether or not to transmit Router Solicitations. If and only if the functional setting is to accept Router Advertisements, Router Solicitations will be transmitted.
Possible values are: 0 Do not accept Router Advertisements. 1 Accept Router Advertisements if forwarding is disabled. 2 Overrule forwarding behaviour. Accept Router Advertisements even if forwarding is enabled.
Functional default: enabled if local forwarding is disabled. disabled if local forwarding is enabled.
Nb: per interface setting (where “interface” is the name of your network interface); “all” is a special interface: changes the settings for all interfaces
默认系统这个参数是1, 当开启forwarding的时候, 不接受路由广播, 所以这个场合, 应该修改为2, Accept Router Advertisements even if forwarding is enabled.
UP U
GATEWAY G
REJECT !
HOST H
REINSTATE R
DYNAMIC D
MODIFIED M
DEFAULT d
ALLONLINK a
ADDRCONF c
NONEXTHOP o
EXPIRES e
CACHE c
FLOW f
POLICY p
LOCAL l
MTU u
WINDOW w
IRTT i
NOTCACHED n
ping 10.4.224.100 -I tunnelX PING 10.4.224.100 (10.4.224.100) from 172.16.172.1 tunnelX: 56(84) bytes of data. ^C --- 10.4.224.100 ping statistics --- 77 packets transmitted, 0 received, 100% packet loss, time 77858ms
查看本地linux的日志可以看到数据包被drop了
Mar 18 09:37:25 gw kernel: IPv4: martian source 10.4.224.100 from 172.16.172.1, on dev tunnelX Mar 18 09:37:25 gw kernel: IPv4: martian source 10.4.224.100 from 172.16.172.1, on dev tunnelX
由于是reverse path 校验嘛, 给它加个路由
ip route add 172.16.0.0/16 dev tunnelX table myRouteTable
于是, 通了
ping 10.4.224.100 -I tunnelX PING 10.4.224.100 (10.4.224.100) from 172.16.172.1 tunnelX: 56(84) bytes of data. 64 bytes from 10.4.224.100: icmp_seq=1 ttl=62 time=2.22 ms 64 bytes from 10.4.224.100: icmp_seq=2 ttl=62 time=37.9 ms
1 - Strict mode as defined in RFC3704 Strict Reverse Path Each incoming packet is tested against the FIB and if the interface is not the best reverse path the packet check will fail. By default failed packets are discarded.
严格检测模式
2 - Loose mode as defined in RFC3704 Loose Reverse Path Each incoming packet's source address is also tested against the FIB and if the source address is not reachable via any interface the packet check will fail.
松散检测模式, 只要有一个设备接口有这个地址就可以
Current recommended practice in RFC3704 is to enable strict mode to prevent IP spoofing from DDos attacks. If using asymmetric routing or other complicated routing, then loose mode is recommended. The max value from conf/{all,interface}/rp_filter is used when doing source validation on the {interface}. Default value is 0. Note that some distributions enable it in startup scripts.
第三种,先看看man里边怎么说: “reject install a blocking route, which will force a route lookup to fail. This is for example used to mask out networks before using the default route. This is NOT for firewalling.” reject是阻止了”到”这个IP的网络,通常用于在使用默认路由前标识网络,不适用于防火墙,为什么呢?因为应用层程序能收到数据包,只不过尝试回包时会知道网络不可达而已
#sh ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/1 unassigned YES unset down down
FastEthernet0/2 unassigned YES unset up up
能看到端口状态,主要是链路状态
#sh interfaces status
Port Name Status Vlan Duplex Speed Type
Fa0/1 “Connect to Cicso notconnect 8 auto auto 10/100BaseTX
Fa0/2 “Connect to Cicso connected 8 a-full a-100 10/100BaseTX
侧重于vlan和描述性的东西,这里能看到链接速度