0% found this document useful (0 votes)
4 views3 pages

Ubuntu Namespace ICMP Packet Lab Guide

The document outlines a lab procedure for creating a network namespace (ns1) on an Ubuntu host and establishing connectivity to send ICMP packets from an external network. It involves creating a bridge, setting up a virtual ethernet pair, configuring IP addresses, enabling IP forwarding, and setting up NAT for the Ubuntu host's ethernet adapter. Finally, it describes how to add a static route on a Windows machine to communicate with the namespace, allowing successful pings from the external network to the namespace.

Uploaded by

baikka.khullam2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Ubuntu Namespace ICMP Packet Lab Guide

The document outlines a lab procedure for creating a network namespace (ns1) on an Ubuntu host and establishing connectivity to send ICMP packets from an external network. It involves creating a bridge, setting up a virtual ethernet pair, configuring IP addresses, enabling IP forwarding, and setting up NAT for the Ubuntu host's ethernet adapter. Finally, it describes how to add a static route on a Windows machine to communicate with the namespace, allowing successful pings from the external network to the namespace.

Uploaded by

baikka.khullam2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

In this lab, we will be creating a namespace inside a Ubuntu host and try to send icmp

packets from outside the network.

1. First create a namespace ns1 and verify it is created

2. We will create a bridge br0 by which we get connected to the host.

3. We will create a virtual ethernet pair which will connect two device. Our ns1 and
bridge. Connect one end to ns1 and another end to the bridge.

4. Set ip address to bridge and the namespace’s end veth pair.

5. In the namespace, turn up the veth1 and loopback interface. Also check it can ping
to the bridge
6. As we will be using the Ubuntu host as a router to namespace. So we have to enable
ip forwarding in Ubuntu.

We can do it in another way, in /etc/[Link] uncomment the


net.ipv4.ip_forward=1
7. The ethernet adapter of Ubuntu host will be working as network address translator,
so we set up the NAT on the adapter.

For my system, ens33 is the ubuntu host ethernet adapter which connects it to the
main host windows.
8. To NAT the address space [Link]/24 to bridge and add forwarding rule between
br0 and veth1.

9. Now in the namespace, we will be adding default route or gateway to route every
packet on it from/to namespace.

10. From windows which is an outside network. It does not know anything about ns1 ip
[Link]. We will set a static route for [Link]/24 network. As the network
is in the Ubuntu system, we will tell windows to send the packet to Ubuntu if its for
the network [Link]/24.

[Link] MASK [Link] (/24) is for the network and [Link] is the ip
address of Ubuntu which will work as a router to the network.
11. Now we are able to ping from windows which is in outside of network
[Link]/24 to namespace

You might also like