Checking small network in mininet by Opendaylight - networking

I have a question about Checking small network by opendaylight
I am not really sure why I can't accress Opendaylight menu which I created from mininet
I am using windows 7 and VMWare player to run mininet and opendaylight(on Ubuntu).
First, i run Ubuntu to run Opendaylight ( I checked that 120.0.0.1:8080 was working)
Second, I run mininet to get IP address.( i will say "192.168.139.128")
Third, based on IP address , it run two putty to run wireshark and building small network
I used sudo mn --mac --controller=remote, ip=192.168.139.128, port=6633.
It successfully build small network. Because i can check all the node infor by command "nodes" and "dump"
However, when I go back to Ubuntu VM and access Opendaylight by 192.168.139.128:8080 (it is given IP from mininet)
I am sure really sure why this happen. Is there any possible reasons ?

Just in case, if anyone is facing the same issue, change network adapter settings in VMWare to use bridge mode.
From the official page
Important troubleshooting - if you are running VirtualBox on the same
host/desktop where the controller is running, and trying to start the
virtual network on Mininet VM produces this error: "Unable to contact
the remote controller at ...", then the following resolves the
problem:
In VirtualBox, go to File-Preferences-Network and make sure you have at least one interface defined as Host-Only. Lets say its name is
vboxnet0
In VirtualBox - Mininet Vm - Settings - Network, check that the adapter is of type Host only , and is connected to the interface from
item 1 (vboxnet0)
On your host where controller and VirtualBox run, do "ifconfig" command to display all network interfaces on the machine.
Search for the interface as in item 1 (vboxnet0 in our example) Take
the ip address specified there (most probably 192.168.56.1 - default),
and that is the correct remote controller ip address to use when
starting a virtual network in mininet vm as stated in the example
above (--controller=remote,ip=192.168.56.1) .
If you are still not able to connect, you might want to consider temporarily disabling firewall on the host running the controller (on
Linux, for example, iptables -F will do the job)
Sometimes, the way you start the mininet is a problem, it does not give error, but does not connect to the remote server. Here is a wrong
example:
sudo mn --topo=tree,3 --mac --switch=ovsk --controller=remote,
ip=192.168.16.10
Here is the correct example:
sudo mn --topo=tree,3 --mac --switch=ovsk
--controller=remote,ip=192.168.16.10
The difference is the "SPACE" between "remote," and "ip".

Also check if you are VMWare player, at IP use this command
sudo mn --mac --controller=remote,--ip=192.168.139.128 --topo tree,5
and refresh your OpenDay Light Controller.

The easiest way is to install Gnome on your Mininet/ODL virtual machine.
I am using the latest (Helium) ODL release so the GUI of ODL is at http://localhost:8181/dlux/indexh.html
on Helium, ODL run inside your distribution folder with ./bin/karaf command (also install required modules inside karaf with feature:install
Attached is my screenshot: https://pbs.twimg.com/media/B8ZgSA6CMAAzuSf.jpg:large

Start the Opendaylight and install the odl-dlux-core plugin. After that the OpenDaylight UI can be accessed through browser on port 8181. So try http://localhost:8181/index.html and you login using username password admin/admin. You should see your topology show up on the UI.

Related

Is it possible to make "WSL" virtual switch external in Windows 20H2 (WSL2.0) and how to configure it?

It's not enough for me to bind WSL ports to localhost because I need to run applications in WSL which must be run in and from my local network. Attempt to switch WSL virtual switch to external in Hyper-V manager leads to Access-denied error (when wsl instance is running) with following big problems with host's and/or WSL's network as a result until I reboot the host. When WSL distro is not running WSL virtual switch is invisible in Hyper-V manager (Virtual switch manager).
I have 2 question and will be very appreciated if someone could help me with that:
Is it a normal behavior - having got problem with network attempting to configure WSL virtual switch directly? As I recall there were no such problems with Hyper-V virtual machines - maybe just short losing of connectivity, not more.
Is there a way to configure WSL such way so it starts with WSL external switch any time I run it? Files .wslconfig and /etc/wsl.conf look to be useless for this - I haven't managed to find the solution in google.
Yes you can convert it to external from Hyper-v Manager. Just start the Hyper-v Manager as Administrator
It is indeed possible to get this configuration to work with IPV4. This is quite tricky, as you need to act on the Network configuration to set an IP address in the external network, and this requires systemd to be enabled.
Install WSL and Ubuntu distribution
First ensure that you have WSL2 installed, and install it if this is not the case
https://learn.microsoft.com/fr-fr/windows/wsl/install
WSL documentation:
https://learn.microsoft.com/en-us/windows/wsl/
It is key to have Ubuntu installed for WSL2, as the KDE installation is not compatible with WSL1.
wsl --install Ubuntu-20.04
It is important to have a recent version of WSL (1.0 as of this writing), as it allows you to use systemd.
Configure networking
By default, WSL installs with NAT and a dynamic IP which changes each time WSL is restarted.
There are also very limited options to access network services brought by WSL, as only TCP ports can be proxied with netsh, not UDP ports. This causes all sorts of issues with X, as it is using UDP ports, and I have been totally unable to make X windows desktops work, despite HOWTOs online claiming success.
If you need additional tools, now is the time to install them, as you are going to lose network connectivity for some time.
apt install net-tools
Change from internal to external network (Hyper-V manager)
You need to open Hyper-V manager and go to the virtual switch management. There is a WSL switch which by default is configured as “Internal network”. You need to change it to “External network”.
You also need to select which physical adapter you are going to connect to, Ethernet or Wifi.
At this point and until you finish network configuration, you no longer have any network connectivity.
Your virtual network card is now connected to the external network, but it is not configured, which we are going to do now by means of systemd.
Configure you virtual network card
From within WSL, edit file /etc/wsl.conf so that it contains:
[network]
generateResolvConf = false
[boot]
systemd=true
Create a file named /etc/systemd/network/26-fixed-ip.network containing (example):
[Match]
Name=eth0
[Network]
Address=192.168.1.60/24
Gateway=192.168.1.1
DNS=192.168.1.30
Select a fixed IP address in your external network range, and adapt the above parameters according to your case.
Configure DNS resolution
We have already instructed WSL not to generate resolv.conf each time it is started, as seen above.
It is now time to configure /etc/resolv.conf to contain:
nameserver 192.168.1.30
nameserver 192.168.1.5
domain xxxxxxxx.net
Check connectivity
Stop and start wsl (from a Windows cmd prompt):
wsl --shutdown
wsl
When wsl is restarted, it gets the fixed IP address, instead of a random one. You may ping any IP address and it works. You may also ping your ip address from another host on your LAN:
ping 192.168.1.60
Yes you can, but it seems to work only in IPv6 in my situation:
When I ran wsl --shutdown and opened Hyper-V Manager, the WSL switch appeared in Virtual Switch Manager, and can be successfully changed to external.
However, the IPv4 address could not be changed, and it's unable to access the Internet via IPv4 either. So I have to assign a NAT IPv6 network (fd68::/64 in my case) to make it work.
Maybe you should do some repair to your system if you can't reproduce this.
Note: if switch WSL is changed to external, your main adapter will become vEthernet (WSL) or something similar.

Hyper-V Networking Does Not work on corporate network

I'll try to explain without confusing you.
I built multiple Hyper-V VM's (using External VS, not Internal VS) on Windows 10 and when I'm connected to my home network, all is well. I can get out to the internet. Everything works as expected.
When I connect to my corporate network via Eth, strange things happen.
Linux VM does not get an IP
Win10 Network Adapters show VS with a public IP - 146... (strange)
Laptop stops routing via corp network and instead is routing using the VS IP (also strange)
As I said, none of these problems occur at home so if there's a specific IT policy blocking me at work, I would appreciate knowing which one so I can tell my Help Desk what to fix. Or is it something else?
Thanks.
You may have to do a ipconfig /release and ipconfig /renew (Windows) or a sudo dhclient -v -r and sudo dhclient -v (Linux) on the remote machine to get it to renew its DHCP settings and retrieve an IP address.

CentOS 6.5 Network Configuration

I've been trying to install CentOS 6.5 on a computer at work for the past couple weeks, but I'm getting stuck at configuring the newtork. I can't get an IP via DHPC. If I setup everything to be static, I get the network icon but not network at all (I can't even ping the gateway).
Maybe I'm missing something? It's a fresh install, and I have trying editing the network-scripts manually and also via the network manager tool. None seems to work, but it all works fine on my Windows computers, even with DHCP.
The router is at 172.16.0.100, subnet 255.255.255.0 and the computer IP could be anything, but I'm using 172.16.0.1.
As root what is the output of ifconfig?
This will display what networking devices have been configured by the system and what the status of them is.
service NetworkManager start;
chkconfig NetworkManager on
ip addr
or
ifconfig eth0 #ip up
or install and use webmin

Virtualbox -- configuring two VMs to talk to each other / host and internet

Host: Windows 7 running lastest VBox + Extension pack
Vm1: lubuntu 3.10
Vm2: Ubuntu server 12.04.3
Problem: Can't get VMs talk/ping each other AND ping the internet at the same time
NAT: VMs have same IP, using ping/ssh is like checking connectivity/connecting to self, lol; can ping internet, can't ping each other
Bridged: VMs get unique IP; can ping each other, not the internet
Host-only: VMs get unique IP; can ping each other; not the internet
Internal network:
intnet, needs to be defined/added to windows 7, however, window 7 not accepting VBOXMANAGE add command, giving errors. VMs wait for network configuration, another 60 seconds and start without a network.
What else can I do?
Change VM to use NAT Network, generic driver... ???
edit /etc/network/interfaces?
change route?
use squid?
Following Lubuntu Networking Message pops up in Lunbutu GUI:
network service discovery disabled
your cuurent network has a .local domain which is not recommended and incompatible with the avahi network service discovery the service has been disabled.
Can anyone help?
Refresh your MAC address using Virtual Box machine settings and remove the kernel’s networking interface rules file so that it can be regenerated:
sudo rm -f /etc/udev/rules.d/70-persistent-net.rules
sudo reboot
It will work for your clone VM.

Connect to server in vmware player while host is not connected to a network

I am using VMWare Player 3.1.0 on Host OS Windows 7 Professional 64-bit. My guest is is SUSE Linux ES 10. My guest OS (SUSE) runs JBoss App Server which I access from host using HTTP. I used a "Bridged" connection to set up all this.
My problem:
When I am connected to network on the Host (using wired network adapter) I can connect to the http server on the Guest OS and browse the application. However, when I am disconnected from the network on Host (unplugged the wire), I cannot access to the guest OS app server and browse the application. I use the guest OS ifconfig command to find out ip address of the guest OS. This ip address does not change whether connected or disconnected. I have even tried using Wireless Data card, but that does not work either.
I have tried "NAT" as well as "Host Only" connection and rebooted the guest but it does not work either. I think for some reason the guest OS can only recognize the physical network card (which is disconnected).
I need to run this machine (my laptop) independently of the network because I use this for demo and need to be able to connect from my host OS to Guest OS.
I am not sure I understand exactly what you are trying to do, but I do know setting up a working NAT configuration will offer you the most flexibility.
Click the networking icon and select settings, Select NAT.
Follow these steps on your Unix OS
cd /etc/sysconfig/network-scripts
Make a backup of your ethernet adapter configuration
cp ifcfg-eth0 ifcfg-eth0.bak
Next modify the settings to look like the following:
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="What ever was here on your system"br/>
NM_CONTROLLED="yes"
ONBOOT="yes"
Save your changes
Restart your network adapters
/etc/init.d/network restart
Try nslookup www.google.com
You should now be able to connect back and forth from your Windows Host and Linux guest.
theJay28
-p.s. I had screenshots, but I do not have the 10 points yet to post images.
I figured that the solution is to restart the VM after making the changes to the NetWork setting on the VMWare. I selected Network for the VM as "Host Only" shutdown the VM and started it again. After that I was able to do what I wanted to do (i.e. browse the web application on guest from the browser in the host machine) without connecting the host to the network.
So key to the solution in my case was to make the network changes and restart the VM.
Any comments suggestions welcome...

Resources