diff --git a/EduNetworkBuilder/EduNetworkBuilder.csproj b/EduNetworkBuilder/EduNetworkBuilder.csproj index 9bf2912..dd76daf 100644 --- a/EduNetworkBuilder/EduNetworkBuilder.csproj +++ b/EduNetworkBuilder/EduNetworkBuilder.csproj @@ -278,6 +278,12 @@ + + + + + + @@ -344,6 +350,7 @@ + diff --git a/EduNetworkBuilder/NB.cs b/EduNetworkBuilder/NB.cs index 403e571..e973c08 100644 --- a/EduNetworkBuilder/NB.cs +++ b/EduNetworkBuilder/NB.cs @@ -70,7 +70,10 @@ namespace EduNetworkBuilder Level4_DualWans, Level4_SinglesLife, Level4_SmallSubnets, Level4_OneRoute, Level4_RouterReplacement, Level4_InternalSubnetting, Level4_Internalhemorrhage, Level5_WirelessRouters, Level5_WirelessDevices, Level5_WirelessBridge, Level5_WirelessRepeater, Level5_WirelessRepeater2, - Level5_WirelessAccessPoint, Level5_WirelessCorruption, Level5_Failed, Level5_LostPacket, Level5_HereComesTrouble + Level5_WirelessAccessPoint, Level5_WirelessCorruption, Level5_Failed, Level5_LostPacket, Level5_HereComesTrouble, + Level6_VLAN_Intro, Level6_VLAN_Intro2, Level6_ForbiddenVLAN, Level6_TaggedBetweenSwitches, Level6_VLANRouting, + Level6_VLANRouting2, + } public enum DebugPausePoint { none=0, packet_create=1, packet_kill=2, packet_in=4, packet_out=8, packet_duplicate=16, all=63, @@ -233,7 +236,7 @@ namespace EduNetworkBuilder public static string ZeroIPString = "0.0.0.0"; public static string LoopbackIPString = "127.0.0.1"; public static int LinkStep = 8;//The percentage of the link we move at each "tick" - public static int PacketPixelSize = 8; //The size of the packet pixel + public static int PacketPixelSize = 16; //The size of the packet pixel public static int PacketVersionNum = 2; //2 uses the new stuff. Anything else uses the old stuff public const int GridSize = 10; public static string[,] LanguageChoices = { { NB.Translate("NB_NBEn"), "en" }, { NB.Translate("NB_NBFr"), "fr" } }; diff --git a/EduNetworkBuilder/NetTest.cs b/EduNetworkBuilder/NetTest.cs index 4c42169..8126223 100644 --- a/EduNetworkBuilder/NetTest.cs +++ b/EduNetworkBuilder/NetTest.cs @@ -525,7 +525,6 @@ namespace EduNetworkBuilder if (TheTest == NetTestType.NeedsForbiddenVLAN && vi.Tag == VLANTagType.Forbidden) return true; if (TheTest == NetTestType.NeedsUntaggedVLAN && vi.Tag == VLANTagType.Untagged) return true; if (TheTest == NetTestType.NeedsTaggedVLAN && vi.Tag == VLANTagType.Tagged) return true; - return false; break; case NetTestType.LockAll: case NetTestType.LockDHCP: diff --git a/EduNetworkBuilder/Network.cs b/EduNetworkBuilder/Network.cs index 8dff60e..1aee811 100644 --- a/EduNetworkBuilder/Network.cs +++ b/EduNetworkBuilder/Network.cs @@ -9,6 +9,7 @@ using System.Xml; using System.IO; using System.Text.RegularExpressions; using System.ComponentModel; +using System.Drawing.Imaging; namespace EduNetworkBuilder @@ -55,6 +56,9 @@ namespace EduNetworkBuilder private bool previously_had_packets = false; //used on "tick" to determine if we are starting from scratch + private List PacketColors = new List(); + private List PacketImages = new List(); + public Network(string Name) { TheNetImage = new Bitmap(myWidth, myHeight); @@ -180,9 +184,19 @@ namespace EduNetworkBuilder { int ID; int.TryParse(Individual.Attributes["ID"].Value, out ID); + string colorname = "Blue"; + if (Individual.Attributes["Color"] != null) + colorname = Individual.Attributes["Color"].Value; + Color PacketColor = Color.FromName(colorname); if (ID > 1) { - VlanNames.Add(new VLANName(ID, Individual.InnerText)); + VlanNames.Add(new VLANName(ID, Individual.InnerText, PacketColor)); + VLANsEnabled = true; + } + else + { + VlanNames.RemoveAt(0); + VlanNames.Insert(0,new VLANName(ID, Individual.InnerText, PacketColor)); VLANsEnabled = true; } } @@ -292,6 +306,7 @@ namespace EduNetworkBuilder { writer.WriteStartElement("VLANName"); writer.WriteAttributeString("ID", VLAN.ID.ToString()); + writer.WriteAttributeString("Color", VLAN.PacketColorString); writer.WriteString(VLAN.Name); writer.WriteEndElement(); } @@ -1404,6 +1419,72 @@ namespace EduNetworkBuilder } } } + + public Image GetPacketImage(Color PacketColor) + { + if(PacketColors.Contains(PacketColor)) + { + return PacketImages[PacketColors.IndexOf(PacketColor)]; + } + PacketColors.Add(PacketColor); + Image newPacketImage = new Bitmap(NB.PacketPixelSize, NB.PacketPixelSize); + using (Graphics G = Graphics.FromImage(newPacketImage)) + { + G.Clear(Color.Transparent); +// Pen myPen = new Pen(PacketColor, NB.PacketPixelSize); + Brush tBrush = new SolidBrush(PacketColor); + G.FillEllipse(tBrush, 0,0, NB.PacketPixelSize, NB.PacketPixelSize); + } + PacketImages.Add(newPacketImage); + return newPacketImage; + } + + public Color ColorFromPacketVLAN(int id) + { + foreach(VLANName VN in VlanNames) + { + if (VN.ID == id) + return VN.PacketColor; + } + return Color.Blue; + } + + //This function heavily borrowed from: http://stackoverflow.com/questions/1563038/fast-work-with-bitmaps-in-c-sharp + public Image ColoredImage(Image BaseImage, Color MorphColor) + { + Bitmap b = new Bitmap(BaseImage); + + BitmapData bData = b.LockBits(new Rectangle(0, 0, BaseImage.Width, BaseImage.Height), ImageLockMode.ReadWrite, b.PixelFormat); + + /* GetBitsPerPixel just does a switch on the PixelFormat and returns the number */ + int bitsPerPixel = Image.GetPixelFormatSize(bData.PixelFormat); + + /*the size of the image in bytes */ + int size = bData.Stride * bData.Height; + + /*Allocate buffer for image*/ + byte[] data = new byte[size]; + + /*This overload copies data of /size/ into /data/ from location specified (/Scan0/)*/ + System.Runtime.InteropServices.Marshal.Copy(bData.Scan0, data, 0, size); + + for (int i = 0; i < size; i += bitsPerPixel / 8) + { + //double magnitude = 1 / 3d * (data[i] + data[i + 1] + data[i + 2]); + + //data[i] is the first of 3 bytes of color + data[i] = (byte)((data[i] + MorphColor.B) / 2); + data[i + 1] = (byte)((data[i + 1] + MorphColor.G) / 2); + data[i + 2] = (byte)((data[i + 2] + MorphColor.R) / 2); + } + + /* This override copies the data back into the location specified */ + System.Runtime.InteropServices.Marshal.Copy(data, 0, bData.Scan0, data.Length); + + b.UnlockBits(bData); + + return b; + } } } diff --git a/EduNetworkBuilder/NetworkBuilder.Designer.cs b/EduNetworkBuilder/NetworkBuilder.Designer.cs index dba994f..b4c4950 100644 --- a/EduNetworkBuilder/NetworkBuilder.Designer.cs +++ b/EduNetworkBuilder/NetworkBuilder.Designer.cs @@ -78,6 +78,8 @@ this.HelpPanel = new System.Windows.Forms.Panel(); this.cbViewTitles = new System.Windows.Forms.CheckBox(); this.myProgressBar = new System.Windows.Forms.ProgressBar(); + this.VLANToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.SolvedVLANToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.msMainMenuStrip.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbNetworkView)).BeginInit(); this.HelpPanel.SuspendLayout(); @@ -94,8 +96,8 @@ this.samplesToolStripMenuItem}); this.msMainMenuStrip.Location = new System.Drawing.Point(0, 0); this.msMainMenuStrip.Name = "msMainMenuStrip"; - this.msMainMenuStrip.Padding = new System.Windows.Forms.Padding(4, 2, 0, 2); - this.msMainMenuStrip.Size = new System.Drawing.Size(463, 28); + this.msMainMenuStrip.Padding = new System.Windows.Forms.Padding(5, 2, 0, 2); + this.msMainMenuStrip.Size = new System.Drawing.Size(617, 28); this.msMainMenuStrip.TabIndex = 0; this.msMainMenuStrip.Text = "msMainMenuStrip"; // @@ -287,7 +289,7 @@ // puzzlesToolStripMenuItem // this.puzzlesToolStripMenuItem.Name = "puzzlesToolStripMenuItem"; - this.puzzlesToolStripMenuItem.Size = new System.Drawing.Size(140, 26); + this.puzzlesToolStripMenuItem.Size = new System.Drawing.Size(181, 26); this.puzzlesToolStripMenuItem.Text = "Puzzles"; this.puzzlesToolStripMenuItem.Click += new System.EventHandler(this.puzzlesToolStripMenuItem_Click); // @@ -298,9 +300,10 @@ this.oneNetworkToolStripMenuItem, this.twoNetworksToolStripMenuItem, this.threeNetworksToolStripMenuItem, - this.firewallsToolStripMenuItem}); + this.firewallsToolStripMenuItem, + this.VLANToolStripMenuItem}); this.solvedToolStripMenuItem.Name = "solvedToolStripMenuItem"; - this.solvedToolStripMenuItem.Size = new System.Drawing.Size(140, 26); + this.solvedToolStripMenuItem.Size = new System.Drawing.Size(181, 26); this.solvedToolStripMenuItem.Text = "Solved"; // // dHCPToolStripMenuItem @@ -345,9 +348,10 @@ this.solvedOneNetworkToolStripMenuItem, this.solvedTwoNetworksToolStripMenuItem, this.SolvedThreeNetworksToolStripMenuItem, - this.firewallsToolStripMenuItem1}); + this.firewallsToolStripMenuItem1, + this.SolvedVLANToolStripMenuItem1}); this.toSolveToolStripMenuItem.Name = "toSolveToolStripMenuItem"; - this.toSolveToolStripMenuItem.Size = new System.Drawing.Size(140, 26); + this.toSolveToolStripMenuItem.Size = new System.Drawing.Size(181, 26); this.toSolveToolStripMenuItem.Text = "To Solve"; // // solvedDHCPToolStripMenuItem @@ -389,10 +393,10 @@ // this.panelChoices.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); - this.panelChoices.Location = new System.Drawing.Point(10, 25); - this.panelChoices.Margin = new System.Windows.Forms.Padding(2); + this.panelChoices.Location = new System.Drawing.Point(13, 31); + this.panelChoices.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.panelChoices.Name = "panelChoices"; - this.panelChoices.Size = new System.Drawing.Size(59, 300); + this.panelChoices.Size = new System.Drawing.Size(79, 369); this.panelChoices.TabIndex = 2; // // lbMessages @@ -402,10 +406,10 @@ this.lbMessages.Font = new System.Drawing.Font("Courier New", 8F); this.lbMessages.FormattingEnabled = true; this.lbMessages.ItemHeight = 16; - this.lbMessages.Location = new System.Drawing.Point(74, 329); - this.lbMessages.Margin = new System.Windows.Forms.Padding(2); + this.lbMessages.Location = new System.Drawing.Point(99, 405); + this.lbMessages.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.lbMessages.Name = "lbMessages"; - this.lbMessages.Size = new System.Drawing.Size(366, 52); + this.lbMessages.Size = new System.Drawing.Size(487, 52); this.lbMessages.TabIndex = 3; this.lbMessages.DoubleClick += new System.EventHandler(this.lbMessages_DoubleClick); // @@ -413,10 +417,9 @@ // this.lblStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.lblStatus.Location = new System.Drawing.Point(74, 400); - this.lblStatus.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.lblStatus.Location = new System.Drawing.Point(99, 492); this.lblStatus.Name = "lblStatus"; - this.lblStatus.Size = new System.Drawing.Size(365, 14); + this.lblStatus.Size = new System.Drawing.Size(487, 17); this.lblStatus.TabIndex = 4; this.lblStatus.Text = "lblStatus"; this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -427,10 +430,10 @@ | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.pbNetworkView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pbNetworkView.Location = new System.Drawing.Point(74, 25); - this.pbNetworkView.Margin = new System.Windows.Forms.Padding(2); + this.pbNetworkView.Location = new System.Drawing.Point(99, 31); + this.pbNetworkView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pbNetworkView.Name = "pbNetworkView"; - this.pbNetworkView.Size = new System.Drawing.Size(366, 300); + this.pbNetworkView.Size = new System.Drawing.Size(487, 369); this.pbNetworkView.TabIndex = 1; this.pbNetworkView.TabStop = false; this.pbNetworkView.DoubleClick += new System.EventHandler(this.pbNetworkView_DoubleClick); @@ -441,10 +444,10 @@ // btnHelp // this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnHelp.Location = new System.Drawing.Point(2, 27); - this.btnHelp.Margin = new System.Windows.Forms.Padding(2); + this.btnHelp.Location = new System.Drawing.Point(3, 33); + this.btnHelp.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.btnHelp.Name = "btnHelp"; - this.btnHelp.Size = new System.Drawing.Size(21, 20); + this.btnHelp.Size = new System.Drawing.Size(28, 25); this.btnHelp.TabIndex = 5; this.btnHelp.Text = "?"; this.btnHelp.UseVisualStyleBackColor = true; @@ -454,8 +457,8 @@ // this.rbHelp4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rbHelp4.AutoSize = true; - this.rbHelp4.Location = new System.Drawing.Point(5, 53); - this.rbHelp4.Margin = new System.Windows.Forms.Padding(2); + this.rbHelp4.Location = new System.Drawing.Point(13, 65); + this.rbHelp4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.rbHelp4.Name = "rbHelp4"; this.rbHelp4.Size = new System.Drawing.Size(17, 16); this.rbHelp4.TabIndex = 6; @@ -466,8 +469,8 @@ // this.rbHelp3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rbHelp3.AutoSize = true; - this.rbHelp3.Location = new System.Drawing.Point(5, 69); - this.rbHelp3.Margin = new System.Windows.Forms.Padding(2); + this.rbHelp3.Location = new System.Drawing.Point(13, 85); + this.rbHelp3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.rbHelp3.Name = "rbHelp3"; this.rbHelp3.Size = new System.Drawing.Size(17, 16); this.rbHelp3.TabIndex = 7; @@ -478,8 +481,8 @@ // this.rbHelp2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rbHelp2.AutoSize = true; - this.rbHelp2.Location = new System.Drawing.Point(5, 87); - this.rbHelp2.Margin = new System.Windows.Forms.Padding(2); + this.rbHelp2.Location = new System.Drawing.Point(13, 107); + this.rbHelp2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.rbHelp2.Name = "rbHelp2"; this.rbHelp2.Size = new System.Drawing.Size(17, 16); this.rbHelp2.TabIndex = 8; @@ -491,8 +494,8 @@ this.rbHelp1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rbHelp1.AutoSize = true; this.rbHelp1.Checked = true; - this.rbHelp1.Location = new System.Drawing.Point(5, 105); - this.rbHelp1.Margin = new System.Windows.Forms.Padding(2); + this.rbHelp1.Location = new System.Drawing.Point(13, 129); + this.rbHelp1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.rbHelp1.Name = "rbHelp1"; this.rbHelp1.Size = new System.Drawing.Size(17, 16); this.rbHelp1.TabIndex = 9; @@ -509,16 +512,17 @@ this.HelpPanel.Controls.Add(this.rbHelp1); this.HelpPanel.Controls.Add(this.rbHelp3); this.HelpPanel.Controls.Add(this.rbHelp2); - this.HelpPanel.Location = new System.Drawing.Point(438, 25); - this.HelpPanel.Margin = new System.Windows.Forms.Padding(2); + this.HelpPanel.Location = new System.Drawing.Point(584, 31); + this.HelpPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.HelpPanel.Name = "HelpPanel"; - this.HelpPanel.Size = new System.Drawing.Size(25, 300); + this.HelpPanel.Size = new System.Drawing.Size(33, 369); this.HelpPanel.TabIndex = 10; // // cbViewTitles // this.cbViewTitles.AutoSize = true; - this.cbViewTitles.Location = new System.Drawing.Point(5, 7); + this.cbViewTitles.Location = new System.Drawing.Point(7, 9); + this.cbViewTitles.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cbViewTitles.Name = "cbViewTitles"; this.cbViewTitles.Size = new System.Drawing.Size(18, 17); this.cbViewTitles.TabIndex = 10; @@ -528,18 +532,32 @@ // myProgressBar // this.myProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.myProgressBar.Location = new System.Drawing.Point(10, 329); - this.myProgressBar.Margin = new System.Windows.Forms.Padding(2); + this.myProgressBar.Location = new System.Drawing.Point(13, 405); + this.myProgressBar.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.myProgressBar.Name = "myProgressBar"; - this.myProgressBar.Size = new System.Drawing.Size(59, 19); + this.myProgressBar.Size = new System.Drawing.Size(79, 23); this.myProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous; this.myProgressBar.TabIndex = 11; // + // VLANToolStripMenuItem + // + this.VLANToolStripMenuItem.Name = "VLANToolStripMenuItem"; + this.VLANToolStripMenuItem.Size = new System.Drawing.Size(187, 26); + this.VLANToolStripMenuItem.Text = "VLAN"; + this.VLANToolStripMenuItem.Click += new System.EventHandler(this.VLANToolStripMenuItem_Click); + // + // SolvedVLANToolStripMenuItem1 + // + this.SolvedVLANToolStripMenuItem1.Name = "SolvedVLANToolStripMenuItem1"; + this.SolvedVLANToolStripMenuItem1.Size = new System.Drawing.Size(187, 26); + this.SolvedVLANToolStripMenuItem1.Text = "VLAN"; + this.SolvedVLANToolStripMenuItem1.Click += new System.EventHandler(this.SolvedVLANToolStripMenuItem1_Click); + // // BuilderWindow // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(463, 412); + this.ClientSize = new System.Drawing.Size(617, 507); this.Controls.Add(this.myProgressBar); this.Controls.Add(this.lblStatus); this.Controls.Add(this.lbMessages); @@ -549,7 +567,7 @@ this.Controls.Add(this.HelpPanel); this.Icon = global::EduNetworkBuilder.Properties.Resources.NBIco; this.MainMenuStrip = this.msMainMenuStrip; - this.Margin = new System.Windows.Forms.Padding(2); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Name = "BuilderWindow"; this.Text = "Network Builder"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BuilderWindow_FormClosing); @@ -618,6 +636,8 @@ private System.Windows.Forms.ProgressBar myProgressBar; private System.Windows.Forms.ToolStripMenuItem changeLanguageToolStripMenuItem; private System.Windows.Forms.CheckBox cbViewTitles; + private System.Windows.Forms.ToolStripMenuItem VLANToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem SolvedVLANToolStripMenuItem1; } } diff --git a/EduNetworkBuilder/NetworkBuilder.cs b/EduNetworkBuilder/NetworkBuilder.cs index a70a794..224960e 100644 --- a/EduNetworkBuilder/NetworkBuilder.cs +++ b/EduNetworkBuilder/NetworkBuilder.cs @@ -1207,6 +1207,21 @@ namespace EduNetworkBuilder UpdateMessages(); } + + private void VLANToolStripMenuItem_Click(object sender, EventArgs e) + { + LoadNetworkFromResource("VLAN"); + UpdateMessages(); + } + + private void SolvedVLANToolStripMenuItem1_Click(object sender, EventArgs e) + { + LoadNetworkFromResource("VLAN"); + myNetwork.DoAllClearIPs(); + UpdateMessages(); + UpdateVisuals(); + } + private void threeNetworksToolStripMenuItem_Click(object sender, EventArgs e) { LoadNetworkFromResource("ThreeNets"); @@ -1377,5 +1392,6 @@ namespace EduNetworkBuilder UpdateVisuals(); } } + } } \ No newline at end of file diff --git a/EduNetworkBuilder/NetworkCard.cs b/EduNetworkBuilder/NetworkCard.cs index a2b08e8..60fd069 100644 --- a/EduNetworkBuilder/NetworkCard.cs +++ b/EduNetworkBuilder/NetworkCard.cs @@ -464,11 +464,15 @@ namespace EduNetworkBuilder case NicType.eth: case NicType.wlan: //see if it the packet dest is local to this nic + if (tPacket.MyType == PacketType.dhcp_answer) + Console.WriteLine("DHCP Answer"); foreach (NetworkInterface nf in interfaces.ToList()) { if (tPacket.InboundNic != null && tPacket.InboundNic == this && tPacket.InboundInterface != null && tPacket.InboundInterface == nf) continue; //skip sending it out this interface if it came in this interface. + if (tPacket.MyType == PacketType.dhcp_answer && tPacket.isFresh && tPacket.payloadIP != null && !nf.isLocal(tPacket.payloadIP)) + continue; //If it is a dhcp broadcast, only send it out the interface it belongs to if (tPacket.MyType == PacketType.arp_request && !nf.isLocal(tPacket.destIP)) continue; //only send out arp requests on local networks nPacket = new Packet(tPacket);//Creates a new packet but sets isfresh=false diff --git a/EduNetworkBuilder/NetworkDevice.cs b/EduNetworkBuilder/NetworkDevice.cs index 027edc6..2c808a4 100644 --- a/EduNetworkBuilder/NetworkDevice.cs +++ b/EduNetworkBuilder/NetworkDevice.cs @@ -1492,14 +1492,14 @@ namespace EduNetworkBuilder break; string tMAC = tPacket.destMAC; string ttMAC = tPacket.OutboundDestMAC; - + tPacket.VLANID = NB.UntaggedVLAN; //we are routing, so we adopt the outgoing vlanID - state it needs to be tagged if (BroadcastMatch && tPacket.MyType != PacketType.dhcp_answer) tPacket.OutboundDestMAC = NB.BroadcastMACString; tPacket.destMAC = tPacket.OutboundDestMAC; - //wearehere; //set the vlan id to 1 probably so we adopt the outgoing vlan - if(nic.SendPacketOutNIC(tPacket)) + + if (nic.SendPacketOutNIC(tPacket)) { count++; if (nic.GetNicType == NicType.wan) @@ -1821,12 +1821,14 @@ namespace EduNetworkBuilder if (tPacket.InboundInterface == null) { dst = RequestDHCPLease(tPacket.sourceMAC, tPacket.OutboundIP); + nPacket.OutboundIP = tPacket.OutboundIP; } else { dst = RequestDHCPLease(tPacket.sourceMAC, tPacket.InboundInterface.myIP); + nPacket.OutboundIP = tPacket.InboundInterface.myIP; } - //if we the packet came in on a port... + //if the packet came in on a port... if (tPacket.InboundNic != null && (tPacket.InboundNic.GetNicType == NicType.wport || tPacket.InboundNic.GetNicType == NicType.port)) { IPAddress theIP = HubManagementIP(); @@ -2647,8 +2649,13 @@ namespace EduNetworkBuilder } foreach(ArpEntry dhcp in DHCPLeases) { + if (dhcp.MACAddress == MAC && dhcp.IPAddr != NB.ZeroIPString && NIC_IP != null && gateway != null) - return new IPAddress(dhcp.IPAddr, NIC_IP.GetMask.ToIpString(), gateway.GetIP.ToIpString()); + { + IPAddress addr = new IPAddress(dhcp.IPAddr, NIC_IP.GetMask.ToIpString(), gateway.GetIP.ToIpString()); + if (addr.IsLocal(NIC_IP)) + return addr; + } } return null; } @@ -2680,7 +2687,8 @@ namespace EduNetworkBuilder if (NIC_IP == null) NIC_IP = HubManagementIP(); IPAddress tAddress = LookupDHCPLease(MAC, NIC_IP); - if (tAddress != null) return tAddress; + if (tAddress != null && NIC_IP.IsLocal(tAddress)) + return tAddress; //if we are here, we need to find an address to give. bool stillOK = true; diff --git a/EduNetworkBuilder/NetworkInterface.cs b/EduNetworkBuilder/NetworkInterface.cs index dc75789..12bb2a5 100644 --- a/EduNetworkBuilder/NetworkInterface.cs +++ b/EduNetworkBuilder/NetworkInterface.cs @@ -191,6 +191,7 @@ namespace EduNetworkBuilder VLANTagType What = VI.Tag; Network theNet = NB.GetNetwork(); NetworkDevice HD = theNet.GetDeviceFromID(AttachedToHostNic); + if (HD == null) return; //Oops! Something went wrong. string hostname = HD.hostname; if (What == VLANTagType.Forbidden) @@ -321,6 +322,7 @@ namespace EduNetworkBuilder VLANTagType What = VI.Tag; Network theNet = NB.GetNetwork(); NetworkDevice HD = theNet.GetDeviceFromID(AttachedToHostNic); + if (HD == null) return; string hostname = HD.hostname; if (What == VLANTagType.Forbidden) diff --git a/EduNetworkBuilder/Packet.cs b/EduNetworkBuilder/Packet.cs index ea85b4f..1bb0c78 100644 --- a/EduNetworkBuilder/Packet.cs +++ b/EduNetworkBuilder/Packet.cs @@ -231,8 +231,24 @@ namespace EduNetworkBuilder pencolor = Color.Orange; break; } - Pen myPen = new Pen(pencolor, NB.PacketPixelSize); - Graphics.FromImage(BaseImage).DrawEllipse(myPen, PacketRectangle()); + Network theNet = NB.GetNetwork(); + if (theNet == null) + { + Pen myPen = new Pen(pencolor, NB.PacketPixelSize); + Graphics.FromImage(BaseImage).DrawEllipse(myPen, PacketRectangle()); + } + else + { + Color VLANPacketColor = theNet.ColorFromPacketVLAN(VLANID); + if (VLANPacketColor != Color.Blue) + pencolor = VLANPacketColor; + Image tImage = theNet.GetPacketImage(pencolor); + //if (VLANPacketColor != Color.Blue && VLANPacketColor != Color.Empty) + //{ + // tImage = theNet.ColoredImage(tImage, VLANPacketColor); + //} + Graphics.FromImage(BaseImage).DrawImage(tImage, PacketRectangle()); + } } /// diff --git a/EduNetworkBuilder/Properties/Resources.Designer.cs b/EduNetworkBuilder/Properties/Resources.Designer.cs index d47ad6c..f64a79e 100644 --- a/EduNetworkBuilder/Properties/Resources.Designer.cs +++ b/EduNetworkBuilder/Properties/Resources.Designer.cs @@ -142,7 +142,7 @@ namespace EduNetworkBuilder.Properties { /// /// Looks up a localized string similar to {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}{\f1\fnil\fcharset0 Calibri;}{\f2\fmodern\fprq1\fcharset0 Courier New;}{\f3\fmodern\fprq1\fcharset0 Consolas;}} ///{\colortbl ;\red0\green0\blue255;} - ///{\*\generator Riched20 10.0.10240}{\*\mmathPr\mdispDef1\mwrapIndent1440 }\viewkind4\uc1 + ///{\*\generator Riched20 10.0.14393}{\*\mmathPr\mdispDef1\mwrapIndent1440 }\viewkind4\uc1 ///\pard\widctlpar\sa200\sl276\slmult1\b\f0\fs22\lang9 Help:\b0\par ///This is a basic help document for EduNetworkBuilder. You can get to this by going to "Help" -> [rest of string was truncated]";. /// @@ -772,6 +772,66 @@ namespace EduNetworkBuilder.Properties { } } + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] Level6_ForbiddenVLAN { + get { + object obj = ResourceManager.GetObject("Level6_ForbiddenVLAN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] Level6_TaggedBetweenSwitches { + get { + object obj = ResourceManager.GetObject("Level6_TaggedBetweenSwitches", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] Level6_VLAN_Intro { + get { + object obj = ResourceManager.GetObject("Level6_VLAN_Intro", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] Level6_VLAN_Intro2 { + get { + object obj = ResourceManager.GetObject("Level6_VLAN_Intro2", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] Level6_VLANRouting { + get { + object obj = ResourceManager.GetObject("Level6_VLANRouting", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] Level6_VLANRouting2 { + get { + object obj = ResourceManager.GetObject("Level6_VLANRouting2", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -842,8 +902,14 @@ namespace EduNetworkBuilder.Properties { } /// - /// Looks up a localized string similar to {\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f34\fbidi \froman\fcharset1\fprq2{\*\panose 02040503050406030204}Cambria Math;} - ///{\f39\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}T [rest of string was truncated]";. + /// Looks up a localized string similar to {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}} + ///{\*\generator Riched20 10.0.10586}{\*\mmathPr\mdispDef1\mwrapIndent1440 }\viewkind4\uc1 + ///\pard\nowidctlpar\sa200\sl276\slmult1\b\f0\fs22\lang9 Version 1.0.27\par + ///\b0 * Made distribution easier by CD (does updates from web, but we also have a downloadable zip you can install from)\par + ///\b Version 1.0.26\par + ///\b0 * Major graphics overhaul\par + /// - Packets move on timer\par + /// - Graphics drawn " [rest of string was truncated]";. /// internal static string ReleaseNotes { get { @@ -921,6 +987,16 @@ namespace EduNetworkBuilder.Properties { } } + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] VLAN { + get { + object obj = ResourceManager.GetObject("VLAN", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/EduNetworkBuilder/Properties/Resources.resx b/EduNetworkBuilder/Properties/Resources.resx index b227fd9..43bae63 100644 --- a/EduNetworkBuilder/Properties/Resources.resx +++ b/EduNetworkBuilder/Properties/Resources.resx @@ -391,4 +391,25 @@ ..\Resources\Level1_AddingDevices.enbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\Level6_ForbiddenVLAN.enbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Level6_TaggedBetweenSwitches.enbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Level6_VLANRouting.enbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Level6_VLANRouting2.enbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Level6_VLAN_Intro.enbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Level6_VLAN_Intro2.enbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\VLAN.enbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/EduNetworkBuilder/Resources/Level6_ForbiddenVLAN.enbx b/EduNetworkBuilder/Resources/Level6_ForbiddenVLAN.enbx new file mode 100644 index 0000000..ae2a2ea --- /dev/null +++ b/EduNetworkBuilder/Resources/Level6_ForbiddenVLAN.enbx @@ -0,0 +1,641 @@ + + + + + Vlans are managed by double-clicking the networking device (the switch, for this puzzle), and clicking on the VLANs button. A VLAN has three states, tagged, untagged, and forbidden. Forbidden means it does not work. To fix this puzzle, change the switch VLAN ports to "untagged" for all of the, and then ping the other PC + Forbidden VLANs + 1024 + 1024 + 100 + False + 6 + 1 + 130 + full + True + + laptop0 + 100 + 103 + 559,560 + laptop + False + False + + 192.168.1.1 + 255.255.255.0 + 0.0.0.0 + gw + + + lo + lo0 + + 103 + 104 + laptop0 + lo0 + + lo + 104 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 103 + 105 + laptop0 + eth0 + + eth + 105 + False + + + + eth0 + + 192.168.1.3 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + laptop1 + 100 + 123 + 680,147 + laptop + False + False + + 192.168.2.1 + 255.255.255.0 + 0.0.0.0 + gw + + + lo + lo0 + + 123 + 124 + laptop1 + lo0 + + lo + 124 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 123 + 125 + laptop1 + eth0 + + eth + 125 + False + + + + eth0 + + 192.168.2.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + net_switch0 + 100 + 109 + 406,328 + net_switch + False + False + + 192.168.1.1 + 255.255.255.0 + 0.0.0.0 + gw + + + lo + lo0 + + 109 + 110 + net_switch0 + lo0 + + lo + 110 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 109 + 111 + net_switch0 + management_interface0 + + management_interface + 111 + False + + + + management_interface0 + + 192.168.1.4 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 109 + 112 + net_switch0 + port1 + + port + 112 + False + + + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + + + + port + port2 + + 109 + 113 + net_switch0 + port2 + + port + 113 + False + + + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + + + + port + port3 + + 109 + 114 + net_switch0 + port3 + + port + 114 + False + + + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + + + + port + port4 + + 109 + 115 + net_switch0 + port4 + + port + 115 + False + + + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + + + + port + port5 + + 109 + 116 + net_switch0 + port5 + + port + 116 + False + + + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + + + + port + port6 + + 109 + 117 + net_switch0 + port6 + + port + 117 + False + + + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + + + + port + port7 + + 109 + 118 + net_switch0 + port7 + + port + 118 + False + + + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + + + + + pc0 + 100 + 100 + 246,560 + pc + False + False + + 192.168.1.1 + 255.255.255.0 + 0.0.0.0 + gw + + + lo + lo0 + + 100 + 101 + pc0 + lo0 + + lo + 101 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 100 + 102 + pc0 + eth0 + + eth + 102 + False + + + + eth0 + + 192.168.1.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + router0 + 100 + 119 + 400,158 + router + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 119 + 120 + router0 + lo0 + + lo + 120 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 119 + 121 + router0 + eth0 + + eth + 121 + False + + + + eth0 + + 192.168.1.1 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth1 + + 119 + 122 + router0 + eth1 + + eth + 122 + False + + + + eth1 + + 192.168.2.1 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + + 100 + 102 + pc0 + eth0 + + + 109 + 112 + net_switch0 + port1 + + + normal + 126 + + + + 103 + 105 + laptop0 + eth0 + + + 109 + 113 + net_switch0 + port2 + + + normal + 127 + + + + 109 + 114 + net_switch0 + port3 + + + 119 + 121 + router0 + eth0 + + + normal + 128 + + + + 119 + 122 + router0 + eth1 + + + 123 + 125 + laptop1 + eth0 + + + normal + 129 + + + pc0 + laptop0 + SuccessfullyPings + + + All + All + LockVLANNames + + VLAN + Default + + \ No newline at end of file diff --git a/EduNetworkBuilder/Resources/Level6_TaggedBetweenSwitches.enbx b/EduNetworkBuilder/Resources/Level6_TaggedBetweenSwitches.enbx new file mode 100644 index 0000000..1045758 --- /dev/null +++ b/EduNetworkBuilder/Resources/Level6_TaggedBetweenSwitches.enbx @@ -0,0 +1,1060 @@ + + + + + Switch Ports can have three states: +Unagged +Tagged +Forbidden +When you are connecting switch-to-switch, they should be "Tagged." This makes a "Trunk", or a backbone link that can pass any VLAN. This allows packets to go to all the switches, and let the switches determine what devices they can go to from there. +To complete this puzzle, check both switches. One of them does not have the port1 VLAN (which is what the switches are connected to each-other on) Tagged. Set the VLAN to tagged and then see if you can do the pings. + Tagged VLANs + 1024 + 1024 + 100 + True + 6 + 3 + 145 + full + True + + net_switch0 + 100 + 100 + 240,390 + net_switch + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 100 + 101 + net_switch0 + lo0 + + lo + 101 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 100 + 102 + net_switch0 + management_interface0 + + management_interface + 102 + False + + management_interface0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 100 + 103 + net_switch0 + port1 + + port + 103 + False + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port2 + + 100 + 104 + net_switch0 + port2 + + port + 104 + False + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port3 + + 100 + 105 + net_switch0 + port3 + + port + 105 + False + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port4 + + 100 + 106 + net_switch0 + port4 + + port + 106 + False + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port5 + + 100 + 107 + net_switch0 + port5 + + port + 107 + False + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port6 + + 100 + 108 + net_switch0 + port6 + + port + 108 + False + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port7 + + 100 + 109 + net_switch0 + port7 + + port + 109 + False + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + + net_switch1 + 100 + 110 + 660,390 + net_switch + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 110 + 111 + net_switch1 + lo0 + + lo + 111 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 110 + 112 + net_switch1 + management_interface0 + + management_interface + 112 + False + + management_interface0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 110 + 113 + net_switch1 + port1 + + port + 113 + False + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + + + + port + port2 + + 110 + 114 + net_switch1 + port2 + + port + 114 + False + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + port + port3 + + 110 + 115 + net_switch1 + port3 + + port + 115 + False + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + port + port4 + + 110 + 116 + net_switch1 + port4 + + port + 116 + False + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port5 + + 110 + 117 + net_switch1 + port5 + + port + 117 + False + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port6 + + 110 + 118 + net_switch1 + port6 + + port + 118 + False + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port7 + + 110 + 119 + net_switch1 + port7 + + port + 119 + False + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + + pc0 + 100 + 121 + 100,640 + pc + False + False + Yellow + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 121 + 122 + pc0 + lo0 + + lo + 122 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 121 + 123 + pc0 + eth0 + + eth + 123 + False + + eth0 + + 192.168.1.1 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc1 + 100 + 124 + 240,640 + pc + False + False + Yellow + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 124 + 125 + pc1 + lo0 + + lo + 125 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 124 + 126 + pc1 + eth0 + + eth + 126 + False + + eth0 + + 192.168.1.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc2 + 100 + 127 + 380,640 + pc + False + False + Green + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 127 + 128 + pc2 + lo0 + + lo + 128 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 127 + 129 + pc2 + eth0 + + eth + 129 + False + + eth0 + + 192.168.1.3 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc3 + 100 + 130 + 580,640 + pc + False + False + Green + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 130 + 131 + pc3 + lo0 + + lo + 131 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 130 + 132 + pc3 + eth0 + + eth + 132 + False + + eth0 + + 192.168.1.4 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc4 + 100 + 133 + 750,640 + pc + False + False + Green + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 133 + 134 + pc4 + lo0 + + lo + 134 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 133 + 135 + pc4 + eth0 + + eth + 135 + False + + eth0 + + 192.168.1.5 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc5 + 100 + 136 + 870,640 + pc + False + False + Yellow + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 136 + 137 + pc5 + lo0 + + lo + 137 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 136 + 138 + pc5 + eth0 + + eth + 138 + False + + eth0 + + 192.168.1.6 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + + 100 + 103 + net_switch0 + port1 + + + 110 + 113 + net_switch1 + port1 + + + normal + 120 + + + + 121 + 123 + pc0 + eth0 + + + 100 + 104 + net_switch0 + port2 + + + normal + 139 + + + + 124 + 126 + pc1 + eth0 + + + 100 + 105 + net_switch0 + port3 + + + normal + 140 + + + + 127 + 129 + pc2 + eth0 + + + 100 + 109 + net_switch0 + port7 + + + normal + 141 + + + + 130 + 132 + pc3 + eth0 + + + 110 + 114 + net_switch1 + port2 + + + normal + 142 + + + + 133 + 135 + pc4 + eth0 + + + 110 + 115 + net_switch1 + port3 + + + normal + 143 + + + + 136 + 138 + pc5 + eth0 + + + 110 + 116 + net_switch1 + port4 + + + normal + 144 + + + pc0 + pc1 + SuccessfullyPings + + + pc0 + pc5 + SuccessfullyPings + + + pc0 + pc4 + FailedPing + + + pc0 + 192.168.1.255 + SuccessfullyPings + + + pc2 + pc3 + SuccessfullyPings + + + pc2 + 192.168.1.255 + SuccessfullyPings + + + pc2 + pc0 + FailedPing + + + All + All + LockVLANNames + + VLAN + Default + Sttaff + + \ No newline at end of file diff --git a/EduNetworkBuilder/Resources/Level6_VLANRouting.enbx b/EduNetworkBuilder/Resources/Level6_VLANRouting.enbx new file mode 100644 index 0000000..2e1a5bb --- /dev/null +++ b/EduNetworkBuilder/Resources/Level6_VLANRouting.enbx @@ -0,0 +1,1273 @@ + + + + + This puzzle shows how a firewall can do the routing. Watch, in particular, how pc5 pings pc2. See how the packet, from vlan1, needs to route through to vlan2, and then down to pc2. + VLAN Routing + 1024 + 1024 + 100 + True + 6 + 4 + 154 + full + True + + firewall0 + 100 + 145 + 440,150 + firewall + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 145 + 146 + firewall0 + lo0 + + lo + 146 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + wan + wan0 + + 145 + 149 + firewall0 + wan0 + + wan + 149 + False + + + + wan0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 145 + 147 + firewall0 + eth0 + + eth + 147 + False + + + + eth0 + + 192.168.1.1 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth1 + + 145 + 148 + firewall0 + eth1 + + eth + 148 + False + + + + eth1 + + 192.168.2.1 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + net_switch0 + 100 + 100 + 240,390 + net_switch + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 100 + 101 + net_switch0 + lo0 + + lo + 101 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 100 + 102 + net_switch0 + management_interface0 + + management_interface + 102 + False + + + + management_interface0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 100 + 103 + net_switch0 + port1 + + port + 103 + False + + + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + + + + port + port2 + + 100 + 104 + net_switch0 + port2 + + port + 104 + False + + + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port3 + + 100 + 105 + net_switch0 + port3 + + port + 105 + False + + + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port4 + + 100 + 106 + net_switch0 + port4 + + port + 106 + False + + + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port5 + + 100 + 107 + net_switch0 + port5 + + port + 107 + False + + + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port6 + + 100 + 108 + net_switch0 + port6 + + port + 108 + False + + + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port7 + + 100 + 109 + net_switch0 + port7 + + port + 109 + False + + + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + + net_switch1 + 100 + 110 + 660,390 + net_switch + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 110 + 111 + net_switch1 + lo0 + + lo + 111 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 110 + 112 + net_switch1 + management_interface0 + + management_interface + 112 + False + + + + management_interface0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 110 + 113 + net_switch1 + port1 + + port + 113 + False + + + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + + + + port + port2 + + 110 + 114 + net_switch1 + port2 + + port + 114 + False + + + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + port + port3 + + 110 + 115 + net_switch1 + port3 + + port + 115 + False + + + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + port + port4 + + 110 + 116 + net_switch1 + port4 + + port + 116 + False + + + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port5 + + 110 + 117 + net_switch1 + port5 + + port + 117 + False + + + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port6 + + 110 + 118 + net_switch1 + port6 + + port + 118 + False + + + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port7 + + 110 + 119 + net_switch1 + port7 + + port + 119 + False + + + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + + pc0 + 100 + 121 + 100,640 + pc + False + False + Yellow + + 192.168.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 121 + 122 + pc0 + lo0 + + lo + 122 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 121 + 123 + pc0 + eth0 + + eth + 123 + False + + + + eth0 + + 192.168.1.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc1 + 100 + 124 + 240,640 + pc + False + False + Yellow + + 192.168.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 124 + 125 + pc1 + lo0 + + lo + 125 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 124 + 126 + pc1 + eth0 + + eth + 126 + False + + + + eth0 + + 192.168.1.3 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc2 + 100 + 127 + 360,690 + pc + False + False + Green + + 192.168.2.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 127 + 128 + pc2 + lo0 + + lo + 128 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 127 + 129 + pc2 + eth0 + + eth + 129 + False + + + + eth0 + + 192.168.2.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc3 + 100 + 130 + 570,710 + pc + False + False + Green + + 192.168.2.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 130 + 131 + pc3 + lo0 + + lo + 131 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 130 + 132 + pc3 + eth0 + + eth + 132 + False + + + + eth0 + + 192.168.2.3 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc4 + 100 + 133 + 730,680 + pc + False + False + Green + + 192.168.2.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 133 + 134 + pc4 + lo0 + + lo + 134 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 133 + 135 + pc4 + eth0 + + eth + 135 + False + + + + eth0 + + 192.168.2.4 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc5 + 100 + 136 + 870,640 + pc + False + False + Yellow + + 192.168.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 136 + 137 + pc5 + lo0 + + lo + 137 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 136 + 138 + pc5 + eth0 + + eth + 138 + False + + + + eth0 + + 192.168.1.4 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + + 100 + 103 + net_switch0 + port1 + + + 110 + 113 + net_switch1 + port1 + + + normal + 120 + + + + 136 + 138 + pc5 + eth0 + + + 110 + 116 + net_switch1 + port4 + + + normal + 144 + + + + 133 + 135 + pc4 + eth0 + + + 110 + 115 + net_switch1 + port3 + + + normal + 143 + + + + 130 + 132 + pc3 + eth0 + + + 110 + 114 + net_switch1 + port2 + + + normal + 142 + + + + 100 + 108 + net_switch0 + port6 + + + 145 + 147 + firewall0 + eth0 + + + normal + 152 + + + + 121 + 123 + pc0 + eth0 + + + 100 + 104 + net_switch0 + port2 + + + normal + 139 + + + + 127 + 129 + pc2 + eth0 + + + 100 + 109 + net_switch0 + port7 + + + normal + 141 + + + + 124 + 126 + pc1 + eth0 + + + 100 + 105 + net_switch0 + port3 + + + normal + 140 + + + + 110 + 119 + net_switch1 + port7 + + + 145 + 148 + firewall0 + eth1 + + + normal + 153 + + + pc0 + pc1 + SuccessfullyPings + + + pc0 + pc5 + SuccessfullyPings + + + pc0 + 192.168.1.255 + SuccessfullyPings + + + pc2 + pc3 + SuccessfullyPings + + + pc2 + 192.168.1.255 + SuccessfullyPings + + + All + All + LockVLANNames + + + pc0 + pc3 + SuccessfullyPings + + + pc3 + pc0 + SuccessfullyPings + + + pc5 + pc2 + SuccessfullyPings + + VLAN + Default + Sttaff + + \ No newline at end of file diff --git a/EduNetworkBuilder/Resources/Level6_VLANRouting2.enbx b/EduNetworkBuilder/Resources/Level6_VLANRouting2.enbx new file mode 100644 index 0000000..2c278ec --- /dev/null +++ b/EduNetworkBuilder/Resources/Level6_VLANRouting2.enbx @@ -0,0 +1,1282 @@ + + + + + This is the same layout as with the previous VLAN routing puzzle, except that there is only one network wire going to the firewall. The firewall has two interfaces, with two different IP addresses. One of them is on vlan2 and the other is on vlan1. +For this to work, we need to have two different VLANs on the one wire that goes to the firewall. We need the port to the firewall to be "tagged" for both vlans. Open up the net_switch1 VLAN settings and set the appropriate vlan tags. + VLAN Routing2 + 1024 + 1024 + 100 + True + 6 + 4.5 + 154 + full + True + + firewall0 + 100 + 145 + 660,170 + firewall + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 145 + 146 + firewall0 + lo0 + + lo + 146 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + wan + wan0 + + 145 + 149 + firewall0 + wan0 + + wan + 149 + False + + + + wan0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 145 + 147 + firewall0 + eth0 + + eth + 147 + False + + + + eth0 + + 0.0.0.0 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth1 + + 145 + 148 + firewall0 + eth1 + + eth + 148 + False + + + + eth1 + + 192.168.2.1 + 255.255.255.0 + 0.0.0.0 + ip + + Forbidden + Tagged + + + eth1:1 + + 192.168.1.1 + 255.255.255.0 + 0.0.0.0 + ip + + Tagged + Forbidden + + + + + net_switch0 + 100 + 100 + 240,390 + net_switch + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 100 + 101 + net_switch0 + lo0 + + lo + 101 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 100 + 102 + net_switch0 + management_interface0 + + management_interface + 102 + False + + + + management_interface0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 100 + 103 + net_switch0 + port1 + + port + 103 + False + + + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + + + + port + port2 + + 100 + 104 + net_switch0 + port2 + + port + 104 + False + + + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port3 + + 100 + 105 + net_switch0 + port3 + + port + 105 + False + + + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port4 + + 100 + 106 + net_switch0 + port4 + + port + 106 + False + + + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port5 + + 100 + 107 + net_switch0 + port5 + + port + 107 + False + + + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port6 + + 100 + 108 + net_switch0 + port6 + + port + 108 + False + + + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port7 + + 100 + 109 + net_switch0 + port7 + + port + 109 + False + + + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + + net_switch1 + 100 + 110 + 660,390 + net_switch + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 110 + 111 + net_switch1 + lo0 + + lo + 111 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 110 + 112 + net_switch1 + management_interface0 + + management_interface + 112 + False + + + + management_interface0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 110 + 113 + net_switch1 + port1 + + port + 113 + False + + + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + + + + port + port2 + + 110 + 114 + net_switch1 + port2 + + port + 114 + False + + + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + port + port3 + + 110 + 115 + net_switch1 + port3 + + port + 115 + False + + + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + port + port4 + + 110 + 116 + net_switch1 + port4 + + port + 116 + False + + + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port5 + + 110 + 117 + net_switch1 + port5 + + port + 117 + False + + + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port6 + + 110 + 118 + net_switch1 + port6 + + port + 118 + False + + + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port7 + + 110 + 119 + net_switch1 + port7 + + port + 119 + False + + + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + + pc0 + 100 + 121 + 100,640 + pc + False + False + Yellow + + 192.168.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 121 + 122 + pc0 + lo0 + + lo + 122 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 121 + 123 + pc0 + eth0 + + eth + 123 + False + + + + eth0 + + 192.168.1.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc1 + 100 + 124 + 240,640 + pc + False + False + Yellow + + 192.168.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 124 + 125 + pc1 + lo0 + + lo + 125 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 124 + 126 + pc1 + eth0 + + eth + 126 + False + + + + eth0 + + 192.168.1.3 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc2 + 100 + 127 + 360,690 + pc + False + False + Green + + 192.168.2.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 127 + 128 + pc2 + lo0 + + lo + 128 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 127 + 129 + pc2 + eth0 + + eth + 129 + False + + + + eth0 + + 192.168.2.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc3 + 100 + 130 + 570,710 + pc + False + False + Green + + 192.168.2.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 130 + 131 + pc3 + lo0 + + lo + 131 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 130 + 132 + pc3 + eth0 + + eth + 132 + False + + + + eth0 + + 192.168.2.3 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc4 + 100 + 133 + 730,680 + pc + False + False + Green + + 192.168.2.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 133 + 134 + pc4 + lo0 + + lo + 134 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 133 + 135 + pc4 + eth0 + + eth + 135 + False + + + + eth0 + + 192.168.2.4 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc5 + 100 + 136 + 870,640 + pc + False + False + Yellow + + 192.168.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 136 + 137 + pc5 + lo0 + + lo + 137 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 136 + 138 + pc5 + eth0 + + eth + 138 + False + + + + eth0 + + 192.168.1.4 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + + 100 + 103 + net_switch0 + port1 + + + 110 + 113 + net_switch1 + port1 + + + normal + 120 + + + + 136 + 138 + pc5 + eth0 + + + 110 + 116 + net_switch1 + port4 + + + normal + 144 + + + + 133 + 135 + pc4 + eth0 + + + 110 + 115 + net_switch1 + port3 + + + normal + 143 + + + + 130 + 132 + pc3 + eth0 + + + 110 + 114 + net_switch1 + port2 + + + normal + 142 + + + + 121 + 123 + pc0 + eth0 + + + 100 + 104 + net_switch0 + port2 + + + normal + 139 + + + + 127 + 129 + pc2 + eth0 + + + 100 + 109 + net_switch0 + port7 + + + normal + 141 + + + + 124 + 126 + pc1 + eth0 + + + 100 + 105 + net_switch0 + port3 + + + normal + 140 + + + + 110 + 119 + net_switch1 + port7 + + + 145 + 148 + firewall0 + eth1 + + + normal + 153 + + + pc0 + pc1 + SuccessfullyPings + + + pc0 + pc5 + SuccessfullyPings + + + pc0 + 192.168.1.255 + SuccessfullyPings + + + pc2 + pc3 + SuccessfullyPings + + + pc2 + 192.168.1.255 + SuccessfullyPings + + + All + All + LockVLANNames + + + pc0 + pc3 + SuccessfullyPings + + + pc3 + pc0 + SuccessfullyPings + + + pc5 + pc2 + SuccessfullyPings + + + net_switch1 + port7 - 1 + NeedsTaggedVLAN + + + net_switch1 + port7 - 2 + NeedsTaggedVLAN + + VLAN + Default + Sttaff + + \ No newline at end of file diff --git a/EduNetworkBuilder/Resources/Level6_VLAN_Intro.enbx b/EduNetworkBuilder/Resources/Level6_VLAN_Intro.enbx new file mode 100644 index 0000000..7fa6471 --- /dev/null +++ b/EduNetworkBuilder/Resources/Level6_VLAN_Intro.enbx @@ -0,0 +1,1389 @@ + + + + + This shows what a VLAN does (Virtual LAN). It allows you to separate networks; the devices on each VLAN cannot connect to ones on different VLANs unless they go through a router. + What is a VLAN + 1024 + 1024 + 100 + False + 6 + 0 + 173 + full + True + + net_switch0 + 100 + 104 + 40,410 + net_switch + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 104 + 105 + net_switch0 + lo0 + + lo + 105 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 104 + 106 + net_switch0 + management_interface0 + + management_interface + 106 + False + + + + management_interface0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 104 + 107 + net_switch0 + port1 + + port + 107 + False + + + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port2 + + 104 + 108 + net_switch0 + port2 + + port + 108 + False + + + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port3 + + 104 + 109 + net_switch0 + port3 + + port + 109 + False + + + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port4 + + 104 + 110 + net_switch0 + port4 + + port + 110 + False + + + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port5 + + 104 + 111 + net_switch0 + port5 + + port + 111 + False + + + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port6 + + 104 + 112 + net_switch0 + port6 + + port + 112 + False + + + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port7 + + 104 + 113 + net_switch0 + port7 + + port + 113 + False + + + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + + net_switch1 + 100 + 114 + 240,410 + net_switch + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 114 + 115 + net_switch1 + lo0 + + lo + 115 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 114 + 116 + net_switch1 + management_interface0 + + management_interface + 116 + False + + + + management_interface0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 114 + 117 + net_switch1 + port1 + + port + 117 + False + + + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port2 + + 114 + 118 + net_switch1 + port2 + + port + 118 + False + + + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port3 + + 114 + 119 + net_switch1 + port3 + + port + 119 + False + + + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port4 + + 114 + 120 + net_switch1 + port4 + + port + 120 + False + + + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port5 + + 114 + 121 + net_switch1 + port5 + + port + 121 + False + + + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port6 + + 114 + 122 + net_switch1 + port6 + + port + 122 + False + + + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port7 + + 114 + 123 + net_switch1 + port7 + + port + 123 + False + + + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + + net_switch2 + 100 + 134 + 700,410 + net_switch + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 134 + 135 + net_switch2 + lo0 + + lo + 135 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 134 + 136 + net_switch2 + management_interface0 + + management_interface + 136 + False + + + + management_interface0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 134 + 137 + net_switch2 + port1 + + port + 137 + False + + + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + Tagged + + + + port + port2 + + 134 + 138 + net_switch2 + port2 + + port + 138 + False + + + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + Forbidden + + + + port + port3 + + 134 + 139 + net_switch2 + port3 + + port + 139 + False + + + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + Forbidden + + + + port + port4 + + 134 + 140 + net_switch2 + port4 + + port + 140 + False + + + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + Forbidden + + + + port + port5 + + 134 + 141 + net_switch2 + port5 + + port + 141 + False + + + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + Forbidden + + + + port + port6 + + 134 + 142 + net_switch2 + port6 + + port + 142 + False + + + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + Forbidden + + + + port + port7 + + 134 + 143 + net_switch2 + port7 + + port + 143 + False + + + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + Forbidden + + + + + pc0 + 100 + 157 + 30,580 + pc + False + False + Yellow + + 192.168.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 157 + 158 + pc0 + lo0 + + lo + 158 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 157 + 159 + pc0 + eth0 + + eth + 159 + False + + eth0 + + 192.168.1.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc1 + 100 + 160 + 240,570 + pc + False + False + Green + + 192.168.2.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 160 + 161 + pc1 + lo0 + + lo + 161 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 160 + 162 + pc1 + eth0 + + eth + 162 + False + + eth0 + + 192.168.2.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc2 + 100 + 163 + 590,590 + pc + False + False + Yellow + + 192.168.3.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 163 + 164 + pc2 + lo0 + + lo + 164 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 163 + 165 + pc2 + eth0 + + eth + 165 + False + + eth0 + + 192.168.3.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc3 + 100 + 166 + 800,590 + pc + False + False + Green + + 192.168.4.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 166 + 167 + pc3 + lo0 + + lo + 167 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 166 + 168 + pc3 + eth0 + + eth + 168 + False + + eth0 + + 192.168.4.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + router0 + 100 + 100 + 700,190 + router + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 100 + 101 + router0 + lo0 + + lo + 101 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 100 + 102 + router0 + eth0 + + eth + 102 + False + + + + eth0 + + 192.168.3.1 + 255.255.255.0 + 0.0.0.0 + ip + + Forbidden + Tagged + Forbidden + + + eth0:1 + + 192.168.4.1 + 255.255.255.0 + 0.0.0.0 + ip + + Forbidden + Tagged + Forbidden + + + + eth + eth1 + + 100 + 103 + router0 + eth1 + + eth + 103 + False + + + + eth1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + + router1 + 100 + 130 + 130,190 + router + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 130 + 131 + router1 + lo0 + + lo + 131 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 130 + 132 + router1 + eth0 + + eth + 132 + False + + + + eth0 + + 192.168.1.1 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth1 + + 130 + 133 + router1 + eth1 + + eth + 133 + False + + + + eth1 + + 192.168.2.1 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + + 104 + 107 + net_switch0 + port1 + + + 130 + 132 + router1 + eth0 + + + normal + 151 + + + + 130 + 133 + router1 + eth1 + + + 114 + 117 + net_switch1 + port1 + + + normal + 152 + + + + 134 + 137 + net_switch2 + port1 + + + 100 + 102 + router0 + eth0 + + + normal + 156 + + + + 157 + 159 + pc0 + eth0 + + + 104 + 108 + net_switch0 + port2 + + + normal + 169 + + + + 160 + 162 + pc1 + eth0 + + + 114 + 118 + net_switch1 + port2 + + + normal + 170 + + + + 163 + 165 + pc2 + eth0 + + + 134 + 138 + net_switch2 + port2 + + + normal + 171 + + + + 166 + 168 + pc3 + eth0 + + + 134 + 139 + net_switch2 + port3 + + + normal + 172 + + + pc0 + pc1 + SuccessfullyPings + + + pc2 + pc3 + SuccessfullyPings + + VLAN + Default + Staff + Students + + \ No newline at end of file diff --git a/EduNetworkBuilder/Resources/Level6_VLAN_Intro2.enbx b/EduNetworkBuilder/Resources/Level6_VLAN_Intro2.enbx new file mode 100644 index 0000000..8dc4326 --- /dev/null +++ b/EduNetworkBuilder/Resources/Level6_VLAN_Intro2.enbx @@ -0,0 +1,1061 @@ + + + + + With a VLAN, computers that are on one VLAN cannot talk to computers on a different VLAN unless they have a router. This example has no router, so the yellow computers cannot talk to the green computers. The computer colors are there only to help you visualize the different VLANs. +Ping a number of the computers, and do some broadcast pings to see how things work. Notice that the green computers cannot ping the yellow ones. + VLAN Intro 2 + 1024 + 1024 + 100 + True + 6 + 0.5 + 145 + full + True + + net_switch0 + 100 + 100 + 240,390 + net_switch + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 100 + 101 + net_switch0 + lo0 + + lo + 101 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 100 + 102 + net_switch0 + management_interface0 + + management_interface + 102 + False + + management_interface0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 100 + 103 + net_switch0 + port1 + + port + 103 + False + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + + + + port + port2 + + 100 + 104 + net_switch0 + port2 + + port + 104 + False + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port3 + + 100 + 105 + net_switch0 + port3 + + port + 105 + False + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port4 + + 100 + 106 + net_switch0 + port4 + + port + 106 + False + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port5 + + 100 + 107 + net_switch0 + port5 + + port + 107 + False + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port6 + + 100 + 108 + net_switch0 + port6 + + port + 108 + False + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port7 + + 100 + 109 + net_switch0 + port7 + + port + 109 + False + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + + net_switch1 + 100 + 110 + 660,390 + net_switch + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 110 + 111 + net_switch1 + lo0 + + lo + 111 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 110 + 112 + net_switch1 + management_interface0 + + management_interface + 112 + False + + management_interface0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 110 + 113 + net_switch1 + port1 + + port + 113 + False + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + + + + port + port2 + + 110 + 114 + net_switch1 + port2 + + port + 114 + False + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + port + port3 + + 110 + 115 + net_switch1 + port3 + + port + 115 + False + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + port + port4 + + 110 + 116 + net_switch1 + port4 + + port + 116 + False + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port5 + + 110 + 117 + net_switch1 + port5 + + port + 117 + False + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port6 + + 110 + 118 + net_switch1 + port6 + + port + 118 + False + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + port + port7 + + 110 + 119 + net_switch1 + port7 + + port + 119 + False + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Forbidden + + + + + pc0 + 100 + 121 + 100,640 + pc + False + False + Yellow + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 121 + 122 + pc0 + lo0 + + lo + 122 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 121 + 123 + pc0 + eth0 + + eth + 123 + False + + eth0 + + 192.168.1.1 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc1 + 100 + 124 + 240,640 + pc + False + False + Yellow + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 124 + 125 + pc1 + lo0 + + lo + 125 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 124 + 126 + pc1 + eth0 + + eth + 126 + False + + eth0 + + 192.168.1.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc2 + 100 + 127 + 380,640 + pc + False + False + Green + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 127 + 128 + pc2 + lo0 + + lo + 128 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 127 + 129 + pc2 + eth0 + + eth + 129 + False + + eth0 + + 192.168.1.3 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc3 + 100 + 130 + 580,640 + pc + False + False + Green + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 130 + 131 + pc3 + lo0 + + lo + 131 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 130 + 132 + pc3 + eth0 + + eth + 132 + False + + eth0 + + 192.168.1.4 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc4 + 100 + 133 + 750,640 + pc + False + False + Green + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 133 + 134 + pc4 + lo0 + + lo + 134 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 133 + 135 + pc4 + eth0 + + eth + 135 + False + + eth0 + + 192.168.1.5 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc5 + 100 + 136 + 870,640 + pc + False + False + Yellow + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 136 + 137 + pc5 + lo0 + + lo + 137 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 136 + 138 + pc5 + eth0 + + eth + 138 + False + + eth0 + + 192.168.1.6 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + + 100 + 103 + net_switch0 + port1 + + + 110 + 113 + net_switch1 + port1 + + + normal + 120 + + + + 121 + 123 + pc0 + eth0 + + + 100 + 104 + net_switch0 + port2 + + + normal + 139 + + + + 124 + 126 + pc1 + eth0 + + + 100 + 105 + net_switch0 + port3 + + + normal + 140 + + + + 127 + 129 + pc2 + eth0 + + + 100 + 109 + net_switch0 + port7 + + + normal + 141 + + + + 130 + 132 + pc3 + eth0 + + + 110 + 114 + net_switch1 + port2 + + + normal + 142 + + + + 133 + 135 + pc4 + eth0 + + + 110 + 115 + net_switch1 + port3 + + + normal + 143 + + + + 136 + 138 + pc5 + eth0 + + + 110 + 116 + net_switch1 + port4 + + + normal + 144 + + + pc0 + pc1 + SuccessfullyPings + + + pc0 + pc5 + SuccessfullyPings + + + pc0 + pc4 + FailedPing + + + pc0 + 192.168.1.255 + SuccessfullyPings + + + pc2 + pc3 + SuccessfullyPings + + + pc2 + 192.168.1.255 + SuccessfullyPings + + + pc2 + pc0 + FailedPing + + + net_switch0 + All + LockVLANsOnHost + + + net_switch1 + All + LockVLANsOnHost + + VLAN + Default + Sttaff + + \ No newline at end of file diff --git a/EduNetworkBuilder/Resources/VLAN.enbx b/EduNetworkBuilder/Resources/VLAN.enbx new file mode 100644 index 0000000..fefe00e --- /dev/null +++ b/EduNetworkBuilder/Resources/VLAN.enbx @@ -0,0 +1,1778 @@ + + + + + + VLAN Sample + 1024 + 1024 + 100 + True + 0 + 0 + 171 + full + True + + firewall0 + 100 + 148 + 450,170 + firewall + False + True + + 10.0.0.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 148 + 149 + firewall0 + lo0 + + lo + 149 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + wan + wan0 + + 148 + 152 + firewall0 + wan0 + + wan + 152 + False + + + + wan0 + + 10.0.0.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 148 + 150 + firewall0 + eth0 + + eth + 150 + False + + + + eth0 + + 192.168.1.1 + 255.255.255.0 + 0.0.0.0 + ip + + Tagged + + + eth0:1 + + 192.168.2.1 + 255.255.255.0 + 0.0.0.0 + ip + + Forbidden + Tagged + + + eth0:2 + + 192.168.3.1 + 255.255.255.0 + 0.0.0.0 + ip + + Forbidden + Tagged + + + + eth + eth1 + + 148 + 151 + firewall0 + eth1 + + eth + 151 + False + + + + eth1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + 127.0.0.1 + 0.0.0.0 + 0.0.0.0 + route + + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + route + + + 192.168.1.1 + 192.168.1.5 + 192.168.1.10 + route + + + 192.168.2.1 + 192.168.2.5 + 192.168.2.10 + route + + + 192.168.3.1 + 192.168.3.5 + 192.168.3.10 + route + + + + net_switch0 + 100 + 100 + 220,440 + net_switch + False + False + + 192.168.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 100 + 101 + net_switch0 + lo0 + + lo + 101 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 100 + 102 + net_switch0 + management_interface0 + + management_interface + 102 + False + + + + management_interface0 + + 192.168.1.252 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 100 + 103 + net_switch0 + port1 + + port + 103 + False + + + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port2 + + 100 + 104 + net_switch0 + port2 + + port + 104 + False + + + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + Forbidden + + + + port + port3 + + 100 + 105 + net_switch0 + port3 + + port + 105 + False + + + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port4 + + 100 + 106 + net_switch0 + port4 + + port + 106 + False + + + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + Forbidden + + + + port + port5 + + 100 + 107 + net_switch0 + port5 + + port + 107 + False + + + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + Tagged + + + + port + port6 + + 100 + 108 + net_switch0 + port6 + + port + 108 + False + + + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + Tagged + + + + port + port7 + + 100 + 109 + net_switch0 + port7 + + port + 109 + False + + + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + Tagged + + + + + net_switch1 + 100 + 110 + 450,400 + net_switch + False + False + + 192.168.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 110 + 111 + net_switch1 + lo0 + + lo + 111 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 110 + 112 + net_switch1 + management_interface0 + + management_interface + 112 + False + + + + management_interface0 + + 192.168.1.251 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 110 + 113 + net_switch1 + port1 + + port + 113 + False + + + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + Forbidden + + + + port + port2 + + 110 + 114 + net_switch1 + port2 + + port + 114 + False + + + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + Forbidden + + + + port + port3 + + 110 + 115 + net_switch1 + port3 + + port + 115 + False + + + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + Forbidden + + + + port + port4 + + 110 + 116 + net_switch1 + port4 + + port + 116 + False + + + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + Forbidden + + + + port + port5 + + 110 + 117 + net_switch1 + port5 + + port + 117 + False + + + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + Tagged + + + + port + port6 + + 110 + 118 + net_switch1 + port6 + + port + 118 + False + + + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + Tagged + + + + port + port7 + + 110 + 119 + net_switch1 + port7 + + port + 119 + False + + + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + Tagged + + + + + net_switch2 + 100 + 120 + 690,430 + net_switch + False + False + + 192.168.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 120 + 121 + net_switch2 + lo0 + + lo + 121 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + management_interface + management_interface0 + + 120 + 122 + net_switch2 + management_interface0 + + management_interface + 122 + False + + + + management_interface0 + + 192.168.1.250 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + port + port1 + + 120 + 123 + net_switch2 + port1 + + port + 123 + False + + + + port1 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + port + port2 + + 120 + 124 + net_switch2 + port2 + + port + 124 + False + + + + port2 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + port + port3 + + 120 + 125 + net_switch2 + port3 + + port + 125 + False + + + + port3 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + port + port4 + + 120 + 126 + net_switch2 + port4 + + port + 126 + False + + + + port4 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Forbidden + Untagged + + + + port + port5 + + 120 + 127 + net_switch2 + port5 + + port + 127 + False + + + + port5 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + Tagged + + + + port + port6 + + 120 + 128 + net_switch2 + port6 + + port + 128 + False + + + + port6 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + Tagged + + + + port + port7 + + 120 + 129 + net_switch2 + port7 + + port + 129 + False + + + + port7 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Tagged + Tagged + Tagged + + + + + pc0 + 100 + 130 + 30,620 + pc + False + False + Purple + + 192.168.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 130 + 131 + pc0 + lo0 + + lo + 131 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 130 + 132 + pc0 + eth0 + + eth + 132 + False + + + + eth0 + + 192.168.1.3 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc1 + 100 + 133 + 40,820 + pc + False + False + Purple + + 192.168.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 133 + 134 + pc1 + lo0 + + lo + 134 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 133 + 135 + pc1 + eth0 + + eth + 135 + True + + + + eth0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + + pc2 + 100 + 136 + 370,690 + pc + False + False + Green + + 192.168.2.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 136 + 137 + pc2 + lo0 + + lo + 137 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 136 + 138 + pc2 + eth0 + + eth + 138 + False + + + + eth0 + + 192.168.2.3 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc3 + 100 + 139 + 510,820 + pc + False + False + Green + + 192.168.2.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 139 + 140 + pc3 + lo0 + + lo + 140 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 139 + 141 + pc3 + eth0 + + eth + 141 + True + + + + eth0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + + pc4 + 100 + 142 + 830,600 + pc + False + False + Yellow + + 192.168.3.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 142 + 143 + pc4 + lo0 + + lo + 143 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 142 + 144 + pc4 + eth0 + + eth + 144 + False + + + + eth0 + + 192.168.3.3 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + pc5 + 100 + 145 + 820,770 + pc + False + False + Yellow + + 192.168.3.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 145 + 146 + pc5 + lo0 + + lo + 146 + False + + + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 145 + 147 + pc5 + eth0 + + eth + 147 + True + + + + eth0 + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + + pc6 + 100 + 166 + 820,40 + pc + False + False + + 10.0.1.1 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 166 + 167 + pc6 + lo0 + + lo + 167 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 166 + 168 + pc6 + eth0 + + eth + 168 + False + + eth0 + + 10.0.1.2 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + + router0 + 100 + 162 + 570,40 + router + False + False + + 0.0.0.0 + 0.0.0.0 + 0.0.0.0 + gw + + + lo + lo0 + + 162 + 163 + router0 + lo0 + + lo + 163 + False + + lo0 + + 127.0.0.1 + 255.0.0.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth0 + + 162 + 164 + router0 + eth0 + + eth + 164 + False + + eth0 + + 10.0.0.1 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + eth + eth1 + + 162 + 165 + router0 + eth1 + + eth + 165 + False + + eth1 + + 10.0.1.1 + 255.255.255.0 + 0.0.0.0 + ip + + Untagged + + + + 192.168.3.0 + 255.255.255.0 + 10.0.0.2 + route + + + 192.168.2.0 + 255.255.255.0 + 10.0.0.2 + route + + + 192.168.1.0 + 255.255.255.0 + 10.0.0.2 + route + + + + + 100 + 109 + net_switch0 + port7 + + + 110 + 118 + net_switch1 + port6 + + + normal + 153 + + + + 145 + 147 + pc5 + eth0 + + + 120 + 123 + net_switch2 + port1 + + + normal + 159 + + + + 139 + 141 + pc3 + eth0 + + + 110 + 114 + net_switch1 + port2 + + + normal + 158 + + + + 136 + 138 + pc2 + eth0 + + + 110 + 113 + net_switch1 + port1 + + + normal + 157 + + + + 110 + 117 + net_switch1 + port5 + + + 148 + 150 + firewall0 + eth0 + + + normal + 161 + + + + 148 + 152 + firewall0 + wan0 + + + 162 + 164 + router0 + eth0 + + + normal + 169 + + + + 110 + 119 + net_switch1 + port7 + + + 120 + 128 + net_switch2 + port6 + + + normal + 154 + + + + 133 + 135 + pc1 + eth0 + + + 100 + 104 + net_switch0 + port2 + + + normal + 156 + + + + 142 + 144 + pc4 + eth0 + + + 120 + 124 + net_switch2 + port2 + + + normal + 160 + + + + 130 + 132 + pc0 + eth0 + + + 100 + 103 + net_switch0 + port1 + + + normal + 155 + + + + 162 + 165 + router0 + eth1 + + + 166 + 168 + pc6 + eth0 + + + normal + 170 + + Default + Staff + students + + \ No newline at end of file diff --git a/EduNetworkBuilder/VLANStuff.cs b/EduNetworkBuilder/VLANStuff.cs index 9455e89..062d02e 100644 --- a/EduNetworkBuilder/VLANStuff.cs +++ b/EduNetworkBuilder/VLANStuff.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.ComponentModel; - +using System.Drawing; namespace EduNetworkBuilder { @@ -20,6 +20,11 @@ namespace EduNetworkBuilder [DisplayName("Name")] public string Name { get { return _Name; } set { _Name = value; } } + Color _Color = Color.Empty; + [DisplayName("ColorString")] + public string PacketColorString { get { return _Color.ToString(); } set { _Color = Color.FromName(value); } } + public Color PacketColor { get { return _Color; } set { _Color = value; } } + public VLANName() { } @@ -28,6 +33,14 @@ namespace EduNetworkBuilder { ID = id; Name = name; + PacketColor = Color.Blue; //The default for everything + } + + public VLANName(int id, string name, Color ColorForPacket) + { + ID = id; + Name = name; + _Color = ColorForPacket; } }