I wanted to do a quick test, both to check if my quad network card actually passes traffic ok, but also to properly configure the breakout of dynamips/dynagen to the real world. This is a continuation of this post: http://mellowd.co.uk/ccie/?p=286 – Where I configure the Quad NIC for actual use.

This is a simple topology. I’ll be mapping Router1′s Fa0/0 interface to eth1; Router3′s Fa0/1 interface to eth4; Router9′s Fa0/0 interface to eth3 and finally Router9′s Fa0/1 interface to eth2
I’ll then use corss over cables to connect the topology as in the pic and then I’ll configure it from there.
This is the topology:
Breakout

This is my .net config file:

#Topology created by Darren O'Connor
#www.mellowd.co.uk/ccie
#Feel free to use and change as you see fit. However if you do use please leave my details here at the top
[localhost:7200]
workingdir = /data/dynamips/working

[[3745]]
 image = /data/dynamips/IOS_Images/3745/c3745-adventerprisek9-mz.124-25b.UNCOMPRESSED.bin
 ram = 128
 disk0 = 16
 disk1 = 0
 mmap = true
 ghostios = true

###########################
#                         #
# Breakout Topology       #
#                         #
###########################
[[Router R1]]
  model = 3745
  console = 2001
  autostart = false
  idlepc = 0x623bc0cc
  Fa0/0 = NIO_linux_eth:eth1

[[Router R3]]
  model = 3745
  console = 2003
  autostart = false
  idlepc = 0x623bc0cc
  Fa0/1 = NIO_linux_eth:eth4

[[Router R9]]
  model = 3745
  console = 2009
  autostart = false
  idlepc = 0x623bc0cc
  Fa0/0 = NIO_linux_eth:eth3
  Fa0/1 = NIO_linux_eth:eth2

Before I run the topology I need to ensure that my ethernet interfaces are up, so I use ifconfig to bring them up:

$ sudo ifconfig eth1 up

And so on…

I now run my topology and start all 3 routers up. I’ve configured Router1 and Router9′s Fa0/1 to be in the same subnet and Router3 and Router9′s Fa0/0.

I can then ping across just fine. As a test I removed the crossover cable and the pings immediately stopped.

You can also see from my ifconfig that traffic is being sent and received:

eth1      Link encap:Ethernet  HWaddr 08:00:20:b4:xx:xx
          inet6 addr: fe80::a00:20ff:feb4:xxxx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5015 errors:0 dropped:0 overruns:0 frame:1
          TX packets:5029 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:571801 (571.8 KB)  TX bytes:573210 (573.2 KB)
          Interrupt:23 Base address:0x3000
Tagged with:  

First Quad-Core NIC bought

On November 5, 2009, in CCIE, CCIP, CCNP, Dynamips, Lab Guides, Linux, by Darren

I’ll want to break out my dynamips/dynagen to attach to real switches eventually. In order to do so I need a lot of NIC ports. My server has 3 PCI slots available so I need 3 QUAD NIC’s.

After a bit of research it seems the good ones are the SUN ones, especially for Linux as I’m using. I bought this model: Sun Quad Fast PCI Ethernet Card 501-4366 and here is a picture of it:

Quad1 - Big

You can see it’s not a regular PCI card, however it fits into my PCI slot just fine and more importantly it works just fine! In order to ensure that the card was recognised, run this when Linux has booted:

$ lspci | grep Sun

Remember Sun is case sensitive!

You should see something like this:

04:00.0 Bridge: Sun Microsystems Computer Corp. EBUS (rev 01)
04:00.1 Ethernet controller: Sun Microsystems Computer Corp. Happy Meal 10/100 Ethernet [hme] (rev 01)
04:01.0 Bridge: Sun Microsystems Computer Corp. EBUS (rev 01)
04:01.1 Ethernet controller: Sun Microsystems Computer Corp. Happy Meal 10/100 Ethernet [hme] (rev 01)
04:02.0 Bridge: Sun Microsystems Computer Corp. EBUS (rev 01)
04:02.1 Ethernet controller: Sun Microsystems Computer Corp. Happy Meal 10/100 Ethernet [hme] (rev 01)
04:03.0 Bridge: Sun Microsystems Computer Corp. EBUS (rev 01)
04:03.1 Ethernet controller: Sun Microsystems Computer Corp. Happy Meal 10/100 Ethernet [hme] (rev 01)

That means Linux has got them just fine, however you won’t see them in your ifconfig just yet!

We now need to determine what interface number Linux has decided to give this card. On Ubuntu/Debian Linux check in this file:

$ sudo vi /etc/udev/rules.d/70-persistent-net.rules

You’ll see something similar to this:

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
#
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:xx:xx:xx:xx:xx", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x168c:0x001c (ath5k_pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:xx:xx:xx:xx:xx", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
# PCI device 0x108e:0x1001 (hme)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:20:b4:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x108e:0x1001 (hme)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:20:b4:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
# PCI device 0x108e:0x1001 (hme)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:20:b4:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"
# PCI device 0x108e:0x1001 (hme)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:20:b4:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

Here you can see that Linux has used the names eth1-4 for the 4 NIC’s on the Quad card. I don’t want these NIC’s to always be active. Therefore in my interfaces script I’ll set them as manual. In future I’ll write a dynamips startup script that automatically starts all NIC’s when I start it up. For now this is what my /etc/network/interfaces looks like:

# The loopback network interface
auto lo
iface lo inet loopback
#
# The primary network interface
auto eth0
iface eth0 inet static
address x.x.x.x
netmask 255.255.255.0
gateway x.x.x.x
network x.x.x.x
broadcast x.x.x.x
#
# sunhme
iface eth1 inet manual
#
iface eth2 inet manual
#
iface eth3 inet manual
#
iface eth4 inet manual

Save that file and you’ll now be able to test as follows:

$ sudo ifconfig eth4 up
$ sudo ifconfig eth3 up

$ ifconfig

eth3      Link encap:Ethernet  HWaddr 08:00:20:b4:xx:xx
inet6 addr: fe80::a00:20ff:feb4:xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B)  TX bytes:1404 (1.4 KB)
Interrupt:21 Base address:0x5000

eth4      Link encap:Ethernet  HWaddr 08:00:20:b4:xx:xx
inet6 addr: fe80::a00:20ff:feb4:xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B)  TX bytes:1404 (1.4 KB)
Interrupt:22 Base address:0x6000

So it works just fine. In a future post I’ll be connecting this to a switch and I’ll show you how to do that via the .net file. I’ll also be creating a startup script that loads and configures everything on startup

Tagged with:  

Okay so it’s taken a while to get this working, but it finally is! If you need to get an Abit AirPace Wi-Fi card working in 64-bit Ubuntu server (with no gui tools) this is how you do it.

First you need to install ndiswrapper:

sudo aptitude install ndiswrapper-utils
sudo aptitude install ndiswrapper-utils-1.9
sudo aptitude install ndisgtk

Now you need to download the actual 64-bit driver. As there is no official one I’ve used this one: ar5007eg-64-0.2.tar.gz

Extract the drivers to a folder that won’t get deleted. I’ve put mine in /etc/wireless_driver
Now install the driver:

sudo ndiswrapper -i net5211.inf
sudo ndiswrapper -m

If you do a sudo iwconfig you should see the interface now listed.
Now you need to install the following tools:

sudo aptitude install wireless-tools
sudo aptitude install wpasupplicant

The next step will be to associate the card with your AP. I’m using WPA2 on mine so this is how I did mine. The first thing you need to do is get your SSID password converted into hex.

 sudo wpa_passphrase "SSID" "Passphrase"

Substitute SSID and Passphrase for your actual SSID and password (Ignore the inverted commas themselves). The output will give you a long hex password like so:

psk=blahblahblahwhatever

save this password as you’ll need it in just a bit. N.B. Try not to have a SSID with spaces or a password with special characters. If you do then enter the password with a break character first. The backslash is the break character. This will need to be placed in front of every special character you have when entering your password

Edit your interfaces startup file like so:

 sudo vi /etc/network/interfaces

This is my config, you’ll need to change the SSID and Passphrase to your own

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

#The wireless interface
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "SSID"
wpa-ap-scan 1
wpa-key-mgmt WPA-PSK
wpa-psk "Passphrase we created earlier"

Now we just need to restart the network and everything should be ok:

sudo /etc/init.d/networking restart

You should see the interface in both ifconfig and iwconfig

Tagged with:  

© 2009-2010 Darren O'Connor All Rights Reserved