Saturday, March 26, 2011

Testing IPv6

I've been testing IPv6 Internet access at home using following tunneling modes.
1. 6to4 Automatic Tunnel via Public 6to4 Relay (using Cisco IOS)
2. 6in4 Tunnel using Tunnel Broker (using Cisco IOS)
3. Teredo Tunnel (using Windows 7)

I found using Tunnel Broker (option 2) the most reliable solution.

Following equipments were used in the test.
1. Cisco 1841 Router Running 12.4 code
2. Windows 7 Computers x 2
3. Ubuntu 4.1.2

F0/0 is connected to the Internet.
F0/1 is connected to the Internal Network.

IOS config using Tunnel Broker (Hurricane Electric).


interface FastEthernet0/0
description Outside
ip address dhcp

interface FastEthernet0/1
description Inside
ip address 192.168.2.1 255.255.255.128
ipv6 address 2001:470:1FFF::1/64 <-- HE gave out free /64 blocks
ipv6 enable

interface Tunnel0
description Hurricane Electric IPv6 Tunnel Broker
no ip address
ipv6 address 2001:470:1FFE::1/64
ipv6 enable
tunnel source [my public IP]
tunnel destination [Hurricane Electric assigned IP]
tunnel mode ipv6ip

ipv6 route ::/0 Tunnel0



Once config was completed (and half a day of troubleshooting), I was able to run following tests.
1. ping test to ipv6.google.com, www.ipv6forum.com (ping -6 in Windows and ping6 in Linux)
2. Browse to http://www.kame.net and I saw a dancing Turtle :)
3. Go to http://whatismyv6.com/ and check out my IPv6 addr.

Notes on Windows 7
I ended up having multiple IPv6 addresses on one interface.
1. Link local starting with FE80, but I have to keep this address.
2. Static IPv6 that I assigned manually. I want this address to be the only global IPv6 address.
3. One random IPv6 address assigned by OS.
4. Another temporary IPv6 address.

(I was able to get rid of v6 address in 3 and 4 by disabling RouterDiscover using the following command.


netsh interface ipv6 set interface "Local Area Connection" routerdiscovery=disabled



ref: http://technet.microsoft.com/en-us/library/bb726952.aspx

Notes on Linux (CentOS/RedHat)

Following config was used
1. to assign static IPv6 address to eth0 and
2. to disable stateless autoconfig.


[mid@rdis100 network-scripts]# more /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
DHCPCLASS=
HWADDR=00:0C:29:DA:50:FE
ONBOOT=yes
IPADDR=192.168.2.121
GATEWAY=192.168.2.1
NETMASK=255.255.255.128
IPV6INIT=yes
IPV6ADDR=2001:470:1F07:BAE:0000:0000:0000:121
IPV6_DEFAULTGW=2001:470:1F07:BAE:0000:0000:0000:1

[mid@rdis100 network-scripts]# more /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
IPV6_AUTOCONF=no
HOSTNAME=rafa.connectionless.net

[mid@rdis100 network-scripts]# ip -6 address show dev eth0
2: eth0: mtu 1500 qlen 1000
inet6 2001:470:1f07:bae::121/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:feda:50fe/64 scope link
valid_lft forever preferred_lft forever




Notes on Linux (Ubuntu)

Following config was used
1. to assign static IPv6 address to eth0 and
2. to disable stateless autoconfig.


[mid@rds001 network-scripts]# more /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.2.105
netmask 255.255.255.128
gateway 192.168.2.1


### Start IPV6 static configuration
iface eth0 inet6 static
pre-up modprobe ipv6
address 2001:470:1f07:bae::122
netmask 64
gateway 2001:470:1f07:bae::1
### END IPV6 configuration

[mid@rds001 network-scripts]# sysctl -w net.ipv6.conf.eth0.autoconf=0

[mid@rds001 network-scripts]# /etc/init.d/networking restart

Wednesday, July 21, 2010

JUNOS 101 #2

#2 OSPF
1. Establish OSPF neighbors between EX-8216 over 10G link (area 0)
2. Configure Vlan1 in ospf area 1.




switch #1

protocols {
ospf {
area 0.0.0.0 {
interface xe-0/0/0.0;
}
}
}

interfaces {
xe-0/0/0 {
unit 0 {
family inet {
address 2.2.2.1/30;
}
}
}
}




switch #2

protocols {
ospf {
area 0.0.0.0 {
interface xe-0/0/0.0;
}
area 0.0.0.1 {
interface vlan.1;
}
}
}

interfaces {
xe-0/0/0 {
unit 0 {
family inet {
address 2.2.2.2/30;
}
}
}
}

interface {
vlan {
unit 1 {
family inet {
address 1.1.1.1/24;
}
}
}
}

JUNOS 101 #1

I got a few Juniper boxes to test, 2 x EX-8216 and a few pizza boxes. This is the first time I am working on Junos boxes. These are configuration notes from my first days with Junos on EX-8216.

#1 BGP
Following configuration is
1. Establish a BGP session between two EX-8216
2. Redistribute static route into BGP


Switch #1

interfaces {
xe-0/0/0 {
unit 0 {
family inet {
address 2.2.2.1/30;
}
}
}
}

routing-options {
static {
route 20.20.20.0/24 next-hop 192.168.14.1;
}
router-id 2.2.2.1;
autonomous-system 1;
}

protocols {
bgp {
group ToAS2 {
type external;
family inet {
unicast;
}
export Static;
peer-as 2;
neighbor 2.2.2.2;
}
}
|

policy-options {
policy-statement Static {
term static {
from protocol static;
}
then accept;
}
}


crusader@j-testms1-re0# run show bgp summary
Groups: 1 Peers: 1 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0 0 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
2.2.2.2 2 26364 26345 0 0 1w1d5h 0/0/0/0 0/0/0/0

[edit]
crusader@j-testms1-re0#




Switch #2

interfaces {
xe-0/0/0 {
unit 0 {
family inet {
address 2.2.2.2/30;
}
}
}
}

routing-options {
router-id 2.2.2.2;
autonomous-system 2;
}


protocols {
bgp {
group ToAS1 {
type external;
family inet {
unicast;
}
peer-as 1;
neighbor 2.2.2.1;
}
}
}

crusader@j-testms2-re0# run show bgp summary
Groups: 1 Peers: 1 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0 3 1 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
2.2.2.1 1 26346 26366 0 0 1w1d5h 1/3/3/0 0/0/0/0

[edit]
crusader@j-testms2-re0#

[edit]
crusader@j-testms2-re0# run show route protocol bgp

inet.0: 9 destinations, 11 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

2.2.2.0/30 [BGP/170] 1w1d 05:38:45, localpref 100
AS path: 1 I
> to 2.2.2.1 via xe-0/0/0.0
20.20.20.0/24 *[BGP/170] 1w1d 05:38:45, localpref 100
AS path: 1 I
> to 2.2.2.1 via xe-0/0/0.0
192.168.14.0/24 [BGP/170] 1w1d 05:38:45, localpref 100
AS path: 1 I
> to 2.2.2.1 via xe-0/0/0.0

inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)