Different network classes in the same physical network

83

Solution 1

You can go ahead and share the same switch or hub among two separate "logical" networks. One will use 192.168.1.0/24 and the other will use 192.168.2.0/24. There are some possible caveats:

  1. You will need to use static IP addresses or complex DHCP setup, because you cannot have two DHCP servers on one network.

  2. If you had, say, 100+ computers, and not 10, it would be better to separate these networks physically or via VLANs. But with just 10, broadcasts won't pose any problem.

  3. You'll need a router to route between these two networks, since logically they are separate (computer one one network won't know how to talk/find the other despite the fact that they are on the same physical network).

  4. Same physical network means there is no physical segregation between the two networks. So if you're worried about security, you'll need to use VLAN-enabled switch (expensive) or separate these onto two different physical networks.

Solution 2

You can segregate a physical network/broadcast domain into multiple subnets/broadcast domains using VLAN-enabled switches (not hubs).

Virtual LAN is a layer 2 technology that is supported by IEEE 802.1Q. It adds a tag into the ethernet frame that defines the VLAN ID of the packet. You will need some kind of a layer 3 switch/router for the VLANs to communicate with each other.

enter image description here

Source


A common network design for VLANs is called router-on-a-stick.

The router interface which the switch is connected to via trunking can be divided into many sub-interfaces, with each sub-interface serving as the default gateway of a VLAN. The router then treats each sub-interface as an individual interface for routing and access-control purposes.

For example, if you have VLANs 2, 3 and 4, the router interface can be configured to have interfaces fa0/0.2, fa0/0.3, fa0/0.4.

enter image description here

Source

Solution 3

In the past I have used multiple IP segments over a single physical network or VLAN segment when I have wanted to be able to test server response to LAN failures by injecting a fault without losing the ability to collect data from the machines under test.

You have to be somewhat careful in setting up the router that you will be using to connect the IP segments; if you allow the router to send ICMP-redirect packets then the machines will gradually realize that they are actually on the same physical network and will stop talking to one another through the router which ruins a WAN simulation pretty quickly.

There also is no point in separating the IP segments for security. Packets visible on the LAN will be visible to all of the receivers on the LAN regardless of whether they are on the same IP segment or not. To ensure separate visibility you would need to set up a VLAN using appropriate router hardware. Of course smart routers normally won't send packets that don't have broadcast ethernet frames to port other than the one that contains the destination ether address, but you can't really count on that for security since any client can inject ether frames that will confuse the router into forwarding packets intended for another machine.

Share:
83

Related videos on Youtube

Robin
Author by

Robin

Updated on September 18, 2022

Comments

  • Robin
    Robin almost 2 years

    I'm using heatmap2 function in R. I'm creating heatmaps for different matrices and at the end I want to compare them.I have defined my color pallet and I'm using same color pallet for different matrices, but problem is that after plotting color key interval is different for different heatmaps(for one is from -.0.2 to 0.2 and for other one is from -0.15 to 0.2) and they are not really comparable. Would someone help me to fix this? Here is my effort:

    colors = c(seq(min(Gold),-0.0002,length=100),seq(-0.0003,0.0002,length=20),seq(0.0003,max(Gold),length=100))
    my_palette <- colorRampPalette(c("blue","green","white","yellow", "red"))(n = 219)
    
    
    # Creat heatmap for two matrices:
    
    
    pdf("Gold1.pdf")
    heatmap.2(Gold,Colv=as.dendrogram(hcr),Rowv=as.dendrogram(hc), col=my_palette, scale="none" , key=TRUE, symkey=FALSE, symm=F,symbreaks=T,cexRow=1,cexCol=1,margins=c(6,11),labRow = "" ,trace="none",keysize = 1.2,density.info="none",main="Ground truth",srtCol=90)
    
    heatmap.2(mtlcof,Colv=as.dendrogram(hcr),Rowv=as.dendrogram(hc), col=my_palette, scale="none" , key=TRUE, symkey=FALSE, symm=F,symbreaks=T,cexRow=1,cexCol=1,margins=c(6,11),labRow = "" ,trace="none",keysize = 1.2,density.info="none",main="MTL",srtCol=90)
    dev.off()
    
  • haimg
    haimg over 12 years
    There is absolutely no need to use VLAN. Several networks will share the same switch or hub just fine. And since there are just 10 computers, there will be no problem.
  • Jin
    Jin over 12 years
    That is true and +1 to your answer, but for organization, deployment and design purposes, VLAN is a cleaner solution I think :)
  • slhck
    slhck over 12 years
    Btw: Congrats on reaching 2k, love your edits and your answers, keep it going!