On 2016-07-13 00:29, Justin Vallon wrote: > IPv4 would never have two interfaces with the same IP address. Yes, it can! Thats particular common in non-NAT scenarios.
E.g. Legacy WAN IP picked up by PPP of 192.0.2.1/32 .... Then, Lan IP of 192.0.2.1/28 matching routed address block of 16 addresses provided by ISP. This then allows LAN machines configured with 192.0.2.[2-14] addresses, using the 192.0.2.1 as 'gateway'. There were certain old OSes and dodgy-technicolor-router-firmware etc that didn't ''allow'' same address on different interfaces but this typically isn't a problem, and is common to reduce address usage by 'separate WAN IPs' -- e.g. Zen UK provide that config. > Why is my 6to4-wan6 ip address the same as my lan ip address? Basically, there is no need for a 'separate block' WAN address, OpenWRT just uses the ::1 address for 'itself'... Look like It puts /16 mask (all 2002:: i.e. 6to4 addresses) on wan-interface, presumably basically indicating all 6to4 traffic is handled by the local linux 6to4 stack (directly sends IPv4 to other endpoints etc etc):- > # ifconfig 6to4-wan6 > 6to4-wan6 Link encap:IPv6-in-IPv4 > inet6 addr: 2002:abcd:1234::1/16 Scope:Global Then, the /60 (more specific) mask provides a range of addresses locally on the lan-side:- > # ifconfig br-lan > br-lan Link encap:Ethernet HWaddr E8:DE:27:B8:8A:2E > inet6 addr: 2002:abcd:1234::1/60 Scope:Global As the latter address-range is more longer prefix (more specific) it will route local traffic out the br-lan side as you'd expect... (though I'm slightly puzzled why its' /60 rather than /64). In the ipv6 routing table (ip -6 ro) there must be some default route via the internal 6to4 gateway somewhere, too. There is no 'conflict' in having the same address on multiple interfaces in of itself (indeed sometimes extra addresses are added on loopback interfaces or what-have-you), what you have to question is ambiguity in routing that can be caused if you are not careful.... > Why isn't another address (::2) used for the internal interface? No need, just creates extra complexity, doesn't change the point of consdering the implicit or explicit routing which is what matters more... both sides Certain dodgy technicolor routers barfed at this and a workaround was to bodge the WAN/ppp address to 192.0.2.0 on ISP side essentially but thats' not normally needed... use same address on lan as a PPP link on wan-side is fine. --Simon _______________________________________________ openwrt-users mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
