It may be necessary to run several logical networks isolated from each other via one physical cable. For example, we need to bring a separate wire to the server with access to the WAN, and a separate wire to connect to the local network. In this case, there may be more necessary wires (maybe we are setting up a router that combines the nth number of subnets that are physically isolated from each other and releases them all on the Internet). At the same time, it is often extremely difficult to install such a number of network cards in the server, or it may be undesirably a large number of wires in the route from the switches to the server. In any case, it is advantageous to pack all of these networks into one physical wire. To do this, they came up with a technology that allows you to do this - vlan. There are several different implementations of this technology,

    In this OS, this is done quite elementarily using the example of a server that will work under FreeBSD 6.2-RELEASE-p3.

    We have one Ethernet, into which we need to push 2 different grids

    * The outside world (internet for example)
    * Local network

    To do this, omit the ip settings on the Ethernet interface, in this case it will be em0. We indicate for it only the port speed, duplex and the fact that it is UP.

    How it looks on the server in /etc/rc.conf: We denote vlans for the system, these will be the vlan names for FreeBSD, but not the vlan numbers through which we will work, that is, which are written on the piece of iron in which we We are included, for example, in a certain tsiska. We configure our vlan'y

    ifconfig_em0="up media 100baseTX mediaopt full-duplex"

    cloned_interfaces="vlan0 vlan1"

    ifconfig_vlan0="vlan 1 vlandev em0 ip в локальной сети netmask Маска в локальной сети mtu 1500"
    ifconfig_vlan1="vlan 2 vlandev em0 ip для внешнего мира netmask Маска для внешнего мира mtu 1500"

    Accordingly, on the network equipment into which the server is included vlan'y must be configured: 2 - the outside world, 1 - local area network.

    ifconfig_vlan0 - the vlan name in the FreeBSD system

    vlan 1 - specify the vlan number on the

    vlandev network em0 - send it to work via Ethernet em0

    mtu 1500 - set the MTU (Maximum packet size) to 1500

    Last touch - set the default gateway

    default_router = “Gateway by default »

    There is no description of network equipment settings, since the post relates specifically to FreeBSD. How to configure VLAN on CISCO, I think zepps will tell us in his series of articles on CISCO

    PS: This is my first topic, please do not kick much =)

    Also popular now: