Set up VLAN "20" on eth0
- Base
- 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
- Manually assign
- ip addr add 192.168.20.100/24 dev eth0.20
- ip route add 192.168.20.0/24 dev eth0.20
- ip route add default via 192.168.20.1
Delete
- ip route delete 192.168.20.0/24 dev eth0.20
- ip link set dev eth0.20 down
- ip link delete eth0.20
Notes: "name" may be anything you wish, but then in subsequent commands, you must use it, which can be a bit hard to spot. Take a look at "eth0.20", and try changing it to a random string for testing.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.