• centos6.6配置vlan三层交换


    编辑配置

    /sbin/service network restart
    /sbin/ip link add link eth0 name vlan2 type vlan id 2
    /sbin/ip link add link eth0 name vlan3 type vlan id 3
    /sbin/ip link add link eth0 name vlan4 type vlan id 4
    /sbin/ip link add link eth0 name vlan5 type vlan id 5
    /sbin/ip link add link eth0 name vlan6 type vlan id 6
    /sbin/ip link add link eth0 name vlan7 type vlan id 7
    /sbin/ip link add link eth0 name vlan8 type vlan id 8
    /sbin/ip link set dev vlan2 up
    /sbin/ip link set dev vlan3 up
    /sbin/ip link set dev vlan4 up
    /sbin/ip link set dev vlan5 up
    /sbin/ip link set dev vlan6 up
    /sbin/ip link set dev vlan7 up
    /sbin/ip link set dev vlan8 up
    /sbin/ip addr replace 10.86.1.17/28 dev vlan2
    /sbin/ip addr replace 10.86.1.33/28 dev vlan3
    /sbin/ip addr replace 10.86.1.49/28 dev vlan4
    /sbin/ip addr replace 10.86.1.65/28 dev vlan5
    /sbin/ip addr replace 10.86.1.81/28 dev vlan6
    /sbin/ip addr replace 10.86.1.97/28 dev vlan7
    /sbin/ip addr replace 10.86.1.113/28 dev vlan8
    /sbin/sysctl net.ipv4.ip_forward=1
    /sbin/service iptables restart
    /sbin/iptables -t filter -I FORWARD -j ACCEPT
    /sbin/ip route replace 10.86.1.128/28 via 10.86.1.116
    飞儿传媒www.firadio.com
  • 相关阅读:
    周总结07(2018.1.8-2018.1.13)
    软件工程概论课总结
    第二阶段团队冲刺-seven
    人月神话阅读笔记06
    第二阶段团队冲刺-six
    周总结06(2018.1.1-2018.1.6)
    第二阶段团队冲刺-five
    开发记录06
    开发记录05
    开发记录04
  • 原文地址:https://www.cnblogs.com/firadio/p/4421090.html
Copyright © 2020-2023  润新知