cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
194
Views
0
Helpful
3
Replies
Highlighted
Beginner

multiple ip address blocks on one pc

hi ,

i am using linux for my servers. eth1 lets say have 192.168.1.1 IP address and eth0 have 1.1.1.1  IP address. how will i design my vlans. can i place them on a same vlan?

Thanks,

 

 

3 REPLIES 3
Highlighted

 

Hello

Concept of VLAN aims at a different reason, It will be used virtually to separate LAN to multiple segments. VLAN interface configuration will say about the IP Subnet range. 

However it suggested to have a /24 subnets. 

You can configure the two mentioned ip subnets in a vlan but it will not make sense as you are combine full Class A to Class C into one subnet. 

 

 

Highlighted
Beginner

In the following example you can find the configuration about the interface with the vlan. Here there is a bond interface, but is the same if you use eth :

auto bond0
iface bond0 inet static
        address 172.16.0.6
        netmask 255.255.255.128
        network 172.16.0.0
        up /sbin/ifenslave bond0 eth0 eth2 eth3
        up vconfig add bond0 2
        up /sbin/ifconfig bond0 0.0.0.0
        up ip addr add 172.16.0.6/25 brd 172.16.0.127 dev bond0.2
        up ip link set bond0.2 up
        up vconfig add bond0 4
        up ip addr add 172.16.0.130/25 brd 172.16.0.255 dev bond0.4
        up ip link set bond0.4 up

auto bond1
iface bond1 inet static
        address 192.168.0.2
        netmask 255.255.252.0
        network 192.168.0.0
        up /sbin/ifenslave bond1 eth1 eth4 eth5
        up vconfig add bond1 90
        up ip addr add  192.168.90.2/24 brd 192.168.90.255 dev bond1.90
        up ip link set bond1.90 up
        up vconfig add bond1 91
        up ip addr add  192.168.91.2/24 brd 192.168.91.255 dev bond1.91
        up ip link set bond1.91 up

Highlighted

how will my interface vlan configuration look like?

thanks

 

 

Content for Community-Ad