Last week I switched from ADSL to EuroDOCSIS cable. I couldn't just shut down the DSL connection as several services were still connecting to that IP. So I made my home router (Fedora 15) kind of multihomed.
Configuration
I haven't even taken the time to seperate the ADSL and cable modems, I just hooked them up to the same network interface. Of course, they got their own IP range.
Step 2: Routing By default we send all outgoing packages to the default gateway at 192.168.2.254. Only packets that are answers to incoming packets on the 192.168.1.x network must be routed back to 192.168.1.1 ip rule add from 192.168.1.0/24 lookup 1001 ip route add default gw 192.168.1.1 table 1001
That's all. Of course, above setup only takes care of answering to incoming packets. If you want to load-balance or have a fail-over setup, I suggest you read the Linux Advanced Routing & Traffic Control HOWTO.
Today I made my first native IPv6 connection. I've been running Teredo/Miredo on my laptop for quite a while now, and I thought it was time to get a real IPv6 connection. I could use IPv6 autoconfiguration, but on a server you need a fixed IP.
Needed software
Install required packages that are not included in the Fedora default install: yum install iproute2 ndisc6
Configuring manually
Configuring the network is not that much different from configuring an IPv4 address.
IPv4
IPv6
ip addr add 1.2.3.4/24 dev eth0
ip addr add 2001:1BE8:DEAD:BEEF::1a1a/64 dev eth0
ip route add default via 1.2.3.254
ip route add default via 2001:1BE8:DEAD:BEEF::1
Now test it by pinging/tracerouting some known IPv6 services: [root@localhost ~]# ping6 ipv6.google.com PING ipv6.google.com(2a00:1450:8003::69) 56 data bytes 64 bytes from 2a00:1450:8003::69: icmp_seq=1 ttl=58 time=7.19 ms 64 bytes from 2a00:1450:8003::69: icmp_seq=2 ttl=58 time=7.52 ms 64 bytes from 2a00:1450:8003::69: icmp_seq=3 ttl=58 time=6.98 ms 64 bytes from 2a00:1450:8003::69: icmp_seq=4 ttl=58 time=7.44 ms ^C --- ipv6.google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3003ms rtt min/avg/max/mdev = 6.989/7.287/7.525/0.227 ms [root@localhost ~]# tracert6 ipv6.google.com traceroute to ipv6.google.com (2a00:1450:8003::69) from 2001:1be8:dead:beef::1a1a, 30 hops max, 60 bytes packets 1 2001:1be8:dead:beef::1 (2001:1be8:3f03:541::1) 1.024 ms 0.970 ms 1.036 ms 2 2001:1be8::310:1 (2001:1be8::310:1) 2.618 ms 2001:1be8::300:1 (2001:1be8::300:1) 2.583 ms 2001:1be8::310:1 (2001:1be8::310:1) 2.527 ms 3 pr61.ams04.net.google.com (2001:7f8:1::a501:5169:1) 2.865 ms 2.536 ms 2.184 ms 4 2001:4860::1:0:4b3 (2001:4860::1:0:4b3) 2.801 ms 3.156 ms 24.731 ms 5 2001:4860::2:0:66e (2001:4860::2:0:66e) 7.021 ms 6.830 ms 96.541 ms 6 2001:4860:0:1::31 (2001:4860:0:1::31) 7.092 ms 7.367 ms 12.089 ms 7 2a00:1450:8003::69 (2a00:1450:8003::69) 6.996 ms 7.550 ms 7.341 ms
Configure at boot time
Step 1. Enable IPv6 networking
vim /etc/sysconfig/network then add (or replace): NETWORKING_IPV6=yes
Step 2. Configure IPv6 addresses
vim /etc/sysconfig/network-scripts/ifcfg-eth0 then add the following lines: IPV6INIT=yes IPV6ADDR=2001:1BE8:DEAD:BEEF::1a1a/64 IPV6_DEFAULTGW=2001:1BE8:DEAD:BEEF::1
Step 3. Test
Run service network restart or reboot to test. Warning: if you do this remotely, you may lose the connection. I first locked myself out of my test machine, but I always got a KVM switch attached or VMWare console.
Security
Please remember that using IPv6 also means that there's a new entrance to your network. Use ip6tables to set up a firewall.
Ubuntu/Debian
I'm running RedHat-based software on all of my machines. Above information may be useful for Ubuntu/Debian users, but it's not tested and I'm not supporting it.
Servers: RedHat Enterprise Linux/CentOS is more suitable for servers, as there's a lot of professional level support available. I think that's important, because if I say, get a car accident, I want the servers to be managable by another professional.
Desktops/Laptops: RPM packages are pretty exchangable between RedHat-based platforms. That's a good reason to run Fedora on the desktop.