Network Namespace
Contents
Process Namespace
| |
| |
PID
PID that is above, that is a process namespace.In above example, 1 and 1659.
Network Namespace
Routing Table
A Routing Table, or RIB(Routing Information Base), is a data table stored in a router or a network host that lists the routes to particular network destinations, and in some cases, metrics (distances) associated with those routes.
ARP Table
ARP(Address Resolution Protocol) is the method for finding a host’s Link Layer (MAC) address when only its IP address is known.
Create Network NS
| |

| |

| |
Execute in Network NS
Check Ethernet List
| |
| |
Execute as a NS
ip link
| |
arp
| |
| |
route
| |
| |
Virtual Ethernet
Create veth
| |

Set veth-red to NS red
| |

Set veth-blue to NS blue
| |

Assign IP to Virtual Ethernet
| |

Bring Virtual Ethernet Up
| |

Ping
| |
ARP
red ARP
| |
| |
red ARP Table
| IP | MAC |
|---|---|
| 192.168.15.2 | ba:b0:6d:68:09:e9 |
blue ARP
| |
| |
blue ARP Table
| IP | MAC |
|---|---|
| 192.168.15.1 | 7a:9d:9b:c8:3b:7f |
Host ARP
| |
| |
Host ARP Table
| IP | MAC |
|---|---|
| 192.168.1.3 | 52:54:00:12:35:03 |
| 192.168.1.4 | 52:54:00:12:35:04 |
Linux Bridge
Add Bridge
| |

State Bridge
| |
| |
Bridge
You can see
state DOWN.Active Bridge
| |

Delete Virtual Ethernet
| |

Create Virtual Ethernet
Red Bridge Virtual Ethernet
| |

Blue Bridge Virtual Ethernet
| |

Connect veth-red to NS red
| |

Connect veth-red-br to Bridge v-net-0
| |

Connect veth-blue to NS blue
| |

Connect veth-blue-br to Bridge v-net-0
| |

Assign IP to Virtual Ethernet
| |

Bring Virtual Ethernet Up
| |

Assign IP to v-net-0
Ping Test
| |
Assign IP
| |

Ping Test Again
| |
LAN(Local Area Network)
LAN Diagram

NS blue to LAN
Check Connection
| |
| |
Add Route(Gateway) to NS blue
| |

Ping NS blue to LAN
| |
Add NAT
| |

Ping NS blue to LAN Again
| |
NS blue to WAN
Ping NS blue to WAN
| |
Check NS blue Route
| |
Add Default Gateway
| |

| |
Ping NS blue to WAN Again
| |
CozyFex