- Turn off all "Network Manager" type processes and applications
- Comment out /etc/network/interfaces entries even
- Do all commands as the root user
- Monitoring changes
- In one terminal, run this command and watch it as you execute the commands below to see what is changing
- sudo watch -d 'ip addr;echo =====;ip link;echo =====;ip route'
- Add VLAN
- ip link add link eth0 name eth0.20 type vlan id 20
- ip link set dev eth0 up
- ip link set dev eth0.20 up
- ip addr add 192.168.20.190/24 dev eth0.20
- ip route add default via 192.168.20.1
- For any other VLANs, change the "20" in the commands above to the desired VLAN, e.g.
- ip link add link eth0 name eth0.100 type vlan id 100
- Delete VLAN
- ip link delete eth0.20
- Abstract commands
- Create
- ip addr add IP/NETMASK dev INTERFACE.VID
- ip link set dev INTERFACE.VID up
- ip addr add 192.168.100.101/24 dev eth0.100
- ip link set dev eth0.100 up
- Destroy
- ip link set dev INTERFACE.VID down
- ip link set dev eth0.100 down
- ip link delete INTERFACE.VID
- ip link delete eth0.100
- Notes
- Network addr does not have to match the VLAN name
- VLAN name is arbitrary, you can call it "joe" if you'd like
- http://www.linuxjournal.com/article/7268
- "Trunks using the 802.1q protocol work by adding a 4-byte VLAN identifier to each frame"
- "When a switch receives a tagged unicast frame, it looks up the outgoing port using both the destination MAC address and the VLAN identifier"
- "When a broadcast frame is received, it is flooded out to all active ports participating in that VLAN"
Showing posts with label vlans. Show all posts
Showing posts with label vlans. Show all posts
Saturday, 29 September 2012
VLAN on Linux CLI
Subscribe to:
Posts (Atom)
Interview questions: 2020-12
Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer Networking Layer 1 vs Layer 4 haproxy u...
-
CRITICAL: AWS now offers internal VPC DNS! Below is no longer necessary AFAIK. Woo hoo! http://aws.amazon.com/about-aws/whats-new/2014/...
-
build sudo apt-get install git gcc sudo apt-get install automake autoconf git clone git://github.com/rriley/tsunami-udp.git cd tsunam...
-
From: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382972#c4 Assumptions: jEdit was installed into /Applications directory. Close any...