Re: virtual networking question...
[email protected] Tue, 5 Dec 2017 22:08:30 +0000
| Newsgroups | gmane.user-groups.linux.ilug.general |
|---|---|
| Message-ID | <[email protected]> |
On 2017-11-22 22:13, Braun Brelin wrote: > Hi all, > > I've got a Digital Ocean droplet running Ubuntu 16.04. > > I've set up dynamips so that I can run a virtual cisco 7200 router on it. > > I'm trying to figure out how to ssh to the router console from the DO > droplet. > > So far I haven't been able to get it to work. > > Here is what my dynamips configuration file looks like: > > [127.0.0.1:7200 <http://127.0.0.1:7200>] > > [[7200]] > > image = /opt/dynamips/images/c7200-advipservicesk9-mz.152-4.S5.bin > npe=npe-400 > idlepc = 0x6082c30c > ram = 320 > > [[Router R3]] > model =7200 > console = 2015 > disk0 = 64 > f0/0 = NIO_tap:tap0 > > I set up a br0 interface to bridge between my eth1 device and my tap0 > device. > > root@python-server1:~# brctl show > bridge name bridge id STP enabled interfaces > br0 8000. 5296a0655045 no eth1 > tap0 > > The IP address of tap0 is 172.16.16.5 and its netmask is 255.255.0.0 > > The IP address of the br0 device is 10.131.35.43 > > Here is the virtual router interface configuration > > router3#show ip int brief > Interface IP-Address OK? Method Status Protocol > FastEthernet0/0 172.16.16.5 YES NVRAM up up > FastEthernet0/1 unassigned YES NVRAM administratively down down > > Unfortunately, nothing I do here seem to work. I can't get the droplet > to forward packets to > > 172.16.16.5 to the router. > > When I try and do an ssh 172.16.16.5 as root, it always asks for the > > droplets root password and logs me into the droplet console again. > > Attempting to ping to the outside world from the router fails completely. If you mean "outside world" as "internet-connected hosts", well, I don't think too many of them can successfully route 172.16.16.5 or 10.131.35.43 (RFC1918 :D ) Also, if eth1 and tap0 are bridge members of br0, it's nonsensical to assign IP addresses to them. If you put 172.16.16.5 onto tap0 on the host side (read carefully: *not* the fastether0/0 inside the dynamips VM), you just told the droplet's network stack that it binds 172.16.16.5 for itself, which is why you're seeing the sshd on the droplet respond and not the Cat7200 inside Dynamips. Leaving the virtual Cat7200's config alone, you might have better luck with: br0: 10.131.35.43 (with whatever netmask makes sense) br0: secondary IP 172.16.16.4/31 eth1 and tap0: unnumbered (on the droplet) With this setup, at least on the droplet itself, it will sort-of know that 172.16.16.5 can be directly ARPed for, probably against br0. On Linux, bridging is a layer-2-only operation. Best, Lance Dryden -- Irish Linux Users Group --- You received this message because you are subscribed to the Google Groups "ILUG" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send an email to [email protected]. Visit this group at https://groups.google.com/a/linux.ie/group/ilug/. To view this discussion on the web, visit https://groups.google.com/a/linux.ie/d/msgid/ilug/6a5d5516-1df5-c748-ca48-7aec8c098f96%40sky-haven.net.