It is currently Sun Aug 18, 2019 7:20 pm


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Connecting GNS3 to a Linux bridge; what do you guys use?
PostPosted: Tue Nov 27, 2012 9:18 pm 
Offline

Joined: Thu Oct 18, 2012 6:38 pm
Posts: 21
Hi all

I am having a terrible hard time with connecting GNS3 to a linux bridge
Here is what I am trying to achieve, which is pretty basic and it shouldn't be a problem:

qemu(microcore) <-----> GNS3 ETH Switch <------> Cloud Node [generic ethernet NIO(eth0)] <----> DHCP server configured on the host to serve IPs over eth0

I have two problems:

1)many times this connection: GNS3 ETH Switch <------> Cloud Node [generic ethernet NIO(eth0)] fails with error 206 (could not be created)
the workaround is to save the file and edit it manually. After that you bring up GNS3 and the connection comes up

2)the second problem is that qemu(micorcore) instance doesn't get it's IP although this is served by the server (can see that by using tcpdump on the microcore and on the host)

So since the GNS3 Eth switch is unusable what else would you suggest me to use in odrer to achieve the above ?

thanks
PF


GNS0.8.3, Ubuntu 10.2, qemu 0.11 partched for UDP, brezular's microcore image with network utils on it




Top
 Profile  
 
 Post subject: Re: Connecting GNS3 to a Linux bridge; what do you guys use?
PostPosted: Sat Dec 01, 2012 2:48 pm 
Offline

Joined: Thu Oct 18, 2012 6:38 pm
Posts: 21
If there is someone actively working on this then I would spend the time to create some scenarios so you guys could reproduce to errors and try to fix them.
In short it looks like the only way to connect this switch to a Linux bridge is via a tap interface.
Any other way fails with an error something like "206 -could not create this interface".
However even with the TAP interface the things are not stable.
Try this:
on your linux machine with one network card create a bridge and add the eth0 to it
configure the bridge with and IP and configure DHCP3d server to serve IPs via that bridge interface.
go to gns3 and connect a eth_switch to this bridge via tap0
connect a dhcp client to this eth_switch (could be a microcore or a router configured to get IP via DHCP)
Initially the client gets its DHCP address but after a while the connection dies and it will end up with no ip.

So two things have to be fixed here:
-the eth_switch tap connection to a Linux bridge
-the eth_switch connection to any other type of interface added to a bridge or to the bridge itself.

I am not sure yet if the last point makes entirely sense, it might be just my wrong understanding of the way the linux interfaces work.


Switch connected to eth0 (enaslaved to the bridge)

In this scenario the workstation fails to get a DHCP


=> show run
autostart = False
[qemu 192.168.3.34:10525]
workingdir = None
udp = 40000
[[QemuDevice]]
image = /Arhiva/linux-microcore-3.8.2 with network utils.img
ram = 48
nics = 2
[[QEMU QEMU1]]
e0 = SW1 1
[192.168.3.34:7200]
workingdir = /opt/GNS3/tmp
udp = 10000
[[ETHSW SW1]]
1 = access 1 QEMU1 e0
2 = access 1 nio_gen_eth:eth0
=>


/# brctl show
bridge name bridge id STP enabled interfaces
ManagementBr 8000.00e04c801a50 yes eth13

ip link


13: eth10: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 00:0f:20:67:dc:d1 brd ff:ff:ff:ff:ff:ff
inet6 fe80::20f:20ff:fe67:dcd1/64 scope link
valid_lft forever preferred_lft forever


16: ManagementBr: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether 00:e0:4c:80:1a:50 brd ff:ff:ff:ff:ff:ff
inet 192.168.3.34/24 brd 192.168.3.255 scope global ManagementBr
inet6 fe80::2e0:4cff:fe80:1a50/64 scope link
valid_lft forever preferred_lft forever

In the above scenario it is impossible to delete the link between the switch and the cloud by selecting and pressing delete
If you hold the mouse above the link then the tip "Start capture or Delete" appears and you can do it


Switch connected straight to the Linux Bridge


=> show run
autostart = False
[qemu 192.168.3.34:10525]
workingdir = None
udp = 40000
[[QemuDevice]]
image = /Arhiva/linux-microcore-3.8.2 with network utils.img
ram = 48
nics = 2
[[QEMU QEMU1]]
e0 = SW1 1
[192.168.3.34:7200]
workingdir = /opt/GNS3/tmp
udp = 10000
[[ETHSW SW1]]
1 = access 1 QEMU1 e0

Although the connections seems to be UP the show run shows you NO connection. Obviously the client does not get the IP
Just for fun, in this scenario stop everything and delete the cloud object and the switch and the workstation. You will be left with just one link on the screen!

---------Traceback lines (saved in exception.log)----------
Traceback (most recent call last):

File "/opt/GNS3/src/GNS3/UndoFramework.py", line 175, in redo
self.status = self.topology.deleteLink(link)

File "/opt/GNS3/src/GNS3/Topology.py", line 1225, in deleteLink
self.dynagen.disconnect(dstdev, link.destIf, link.srcIf, automatically_remove_unused_slot=False)

File "/opt/GNS3/src/GNS3/Dynagen/dynagen.py", line 387, in disconnect
local_device.slot[slot1].disconnect(pa1, port1)

File "/opt/GNS3/src/GNS3/Dynagen/dynamips_lib.py", line 4677, in disconnect
nio = self.nio(localport).name

AttributeError: 'NoneType' object has no attribute 'name'

-----------------------------------------------------------
10:17:54: DEBUG (1): sending to dynamips at 192.168.3.34:7200 -> ethsw delete SW1
10:17:54: DEBUG (1): returned -> ["100-ETHSW 'SW1' deleted"]
10:17:56: DEBUG (1): PORT TRACKER: freeing port 4001
10:17:56: DEBUG (1): sending to qemuwrapper at 192.168.3.34:10525 -> qemu delete QEMU1
10:17:56: DEBUG (1): returned -> ["100-Qemu 'QEMU1' deleted"]

When you configure the cloud object to connect to the Linux Bridge the kernel reports that correctly

Dec 1 10:08:48 MyServer kernel: [18499.403774] device ManagementBr left promiscuous mode
Dec 1 10:08:59 MyServer kernel: [18510.413807] device ManagementBr entered promiscuous mode


Switch connected to the bridge via a TAP interface



=>
=>
=> show run
autostart = False
[qemu 192.168.3.34:10525]
workingdir = None
udp = 40000
[[QemuDevice]]
image = /Arhiva/linux-microcore-3.8.2 with network utils.img
ram = 48
nics = 2
[[QEMU QEMU1]]
e0 = SW1 1
[192.168.3.34:7200]
workingdir = /opt/GNS3/tmp
udp = 10000
[[ETHSW SW1]]
1 = access 1 QEMU1 e0
2 = access 1 nio_tap:tap0
=>


/# brctl addif ManagementBr tap0

/# brctl show
bridge name bridge id STP enabled interfaces
ManagementBr 8000.00e04c801a50 yes eth13
tap0
/#

Dec 1 10:25:25 MyServer NetworkManager: <WARN> device_creator(): /sys/devices/virtual/net/tap0: couldn't determine device driver; ignoring...
Dec 1 10:26:18 MyServer kernel: [19549.063563] device tap0 entered promiscuous mode
Dec 1 10:32:56 MyServer kernel: [19947.215593] ManagementBr: topology change detected, propagating
Dec 1 10:32:56 MyServer kernel: [19947.215599] ManagementBr: port 2(tap0) entering forwarding state
Dec 1 10:32:57 MyServer dhcpd: DHCPDISCOVER from 00:ab:29:8c:3e:00 via ManagementBr
Dec 1 10:32:58 MyServer dhcpd: DHCPOFFER on 192.168.3.11 to 00:ab:29:8c:3e:00 (box) via ManagementBr
Dec 1 10:32:58 MyServer dhcpd: Wrote 0 deleted host decls to leases file.
Dec 1 10:32:58 MyServer dhcpd: Wrote 0 new dynamic host decls to leases file.
Dec 1 10:32:58 MyServer dhcpd: Wrote 25 leases to leases file.
Dec 1 10:32:58 MyServer dhcpd: DHCPREQUEST for 192.168.3.11 (192.168.3.34) from 00:ab:29:8c:3e:00 (box) via ManagementBr
Dec 1 10:32:58 MyServer dhcpd: DHCPACK on 192.168.3.11 to 00:ab:29:8c:3e:00 (box) via ManagementBr

Dec 1 10:33:07 MyServer kernel: [19958.200007] tap0: no IPv6 routers present




Attachments:
Link only.jpg
Link only.jpg [ 114.57 KiB | Viewed 4221 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO