More updates. Fixed PingFailed. More VLAN levels
This commit is contained in:
parent
52c7ab63e2
commit
58beb9490b
@ -287,6 +287,7 @@
|
||||
<None Include="Resources\Level5_WirelessRepeater.enbx" />
|
||||
<None Include="Resources\Level5_WirelessRepeater2.enbx" />
|
||||
<None Include="Resources\Level5_WirelessRouters.enbx" />
|
||||
<None Include="Resources\Level6_ConnectTheLaptop.enbx" />
|
||||
<None Include="Resources\Level6_ForbiddenVLAN.enbx" />
|
||||
<None Include="Resources\Level6_Intro3_LockedOut.enbx" />
|
||||
<None Include="Resources\Level6_SorryBoss.enbx" />
|
||||
|
@ -74,7 +74,7 @@ namespace EduNetworkBuilder
|
||||
Level5_WirelessAccessPoint, Level5_WirelessCorruption, Level5_Failed, Level5_LostPacket, Level5_HereComesTrouble,
|
||||
Level6_VLAN_Intro, Level6_VLAN_Intro2, Level6_Intro3_LockedOut, Level6_ForbiddenVLAN, Level6_TaggedBetweenSwitches,
|
||||
Level6_VLANRouting, Level6_VLANRouting2, level6_UntaggedAndDHCP, Level6_SorryBoss, Level6_VLANFrustrations,
|
||||
Level6_TwoAccessPoints, Level6_VlanRouting3,
|
||||
Level6_TwoAccessPoints, Level6_VlanRouting3, Level6_ConnectTheLaptop,
|
||||
|
||||
}
|
||||
public enum DebugPausePoint { none=0, packet_create=1, packet_kill=2,
|
||||
@ -172,6 +172,13 @@ namespace EduNetworkBuilder
|
||||
}
|
||||
}
|
||||
|
||||
public class PingTestStatus
|
||||
{
|
||||
public string Source;
|
||||
public string Dest;
|
||||
public bool Succeeded = false;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct ArpEntry
|
||||
{
|
||||
|
@ -59,6 +59,7 @@ namespace EduNetworkBuilder
|
||||
|
||||
private List<string> PacketColors = new List<string>();
|
||||
private List<Image> PacketImages = new List<Image>();
|
||||
private List<PingTestStatus> PingTestStats = new List<PingTestStatus>();
|
||||
|
||||
public Network(string Name)
|
||||
{
|
||||
@ -808,6 +809,10 @@ namespace EduNetworkBuilder
|
||||
{
|
||||
string sHost = ReverseDNSLookup(source, sIP);
|
||||
string dHost = ReverseDNSLookup(source, dIP);
|
||||
if (packet_type == PacketType.ping_answer)
|
||||
{
|
||||
RegisterPingSuccess(sHost, dHost);
|
||||
}
|
||||
//If we are checking a ping, but we already have done it, we see if there is a ping-again
|
||||
foreach (NetTest nt in NetTests)
|
||||
{
|
||||
@ -1084,6 +1089,15 @@ namespace EduNetworkBuilder
|
||||
ND.ClearIPConnectionInfo();
|
||||
}
|
||||
}
|
||||
foreach(PingTestStatus PTS in PingTestStats)
|
||||
{
|
||||
if (PTS.Succeeded == false)
|
||||
{
|
||||
//We mark it as failed
|
||||
NoteActionDone(NetTestType.FailedPing, PTS.Source, PTS.Dest);
|
||||
}
|
||||
}
|
||||
PingTestStats.Clear(); //empty it for now.
|
||||
DebugPausePoint WhatIsSet = NB.GetDebugPauseSetting();
|
||||
if (WhatIsSet != 0)
|
||||
{
|
||||
@ -1352,6 +1366,28 @@ namespace EduNetworkBuilder
|
||||
return found;
|
||||
}
|
||||
|
||||
public void RegisterPingTest(string source, string dest)
|
||||
{
|
||||
PingTestStatus PTS = new PingTestStatus();
|
||||
PTS.Source = source;
|
||||
PTS.Dest = dest;
|
||||
PTS.Succeeded = false;
|
||||
PingTestStats.Add(PTS);
|
||||
}
|
||||
|
||||
public void RegisterPingSuccess(string source, string dest)
|
||||
{
|
||||
foreach (PingTestStatus PST in PingTestStats)
|
||||
{
|
||||
if (PST.Source == source &&
|
||||
PST.Dest == dest)
|
||||
{
|
||||
PST.Succeeded = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************
|
||||
* Do On All Devices
|
||||
* **************************************/
|
||||
|
@ -1290,6 +1290,8 @@ namespace EduNetworkBuilder
|
||||
//We need to create a packet
|
||||
Packet PingPacket = new Packet(this,Destination, NB.Translate("H_Ping_Title"), PacketType.ping_request);
|
||||
Network myNet = NB.GetNetwork();
|
||||
string dHost = myNet.ReverseDNSLookup(this, Destination);
|
||||
myNet.RegisterPingTest(hostname, dHost);
|
||||
myNet.addPacket(PingPacket);
|
||||
}
|
||||
|
||||
|
@ -435,17 +435,19 @@ namespace EduNetworkBuilder
|
||||
}
|
||||
if (MyStatus != PacketStatus.finished)
|
||||
myNet.AddMessage(Tracking); //We only store finished_failed, and finished_ok
|
||||
if (sourceIP != null && destIP != null)
|
||||
{
|
||||
if (MyType == PacketType.ping_answer && MyStatus == PacketStatus.finished_failed)
|
||||
{
|
||||
myNet.NoteActionDone(NetTestType.FailedPing, destIP.GetIPString, sourceIP.GetIPString);
|
||||
}
|
||||
if (MyType == PacketType.ping_request && MyStatus == PacketStatus.finished_failed)
|
||||
{
|
||||
myNet.NoteActionDone(NetTestType.FailedPing, sourceIP.GetIPString, destIP.GetIPString);
|
||||
}
|
||||
}
|
||||
//if (sourceIP != null && destIP != null)
|
||||
//{
|
||||
// if (MyType == PacketType.ping_answer && MyStatus == PacketStatus.finished_failed)
|
||||
// {
|
||||
// myNet.NoteActionDone(NetTestType.FailedPing, destIP.GetIPString, sourceIP.GetIPString);
|
||||
// }
|
||||
// if (MyType == PacketType.ping_request && MyStatus == PacketStatus.finished_failed)
|
||||
// {
|
||||
// myNet.NoteActionDone(NetTestType.FailedPing, sourceIP.GetIPString, destIP.GetIPString);
|
||||
// if(WhereAmI != null)
|
||||
// Console.WriteLine("Dropping at: "+ WhereAmI.hostname);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
10
EduNetworkBuilder/Properties/Resources.Designer.cs
generated
10
EduNetworkBuilder/Properties/Resources.Designer.cs
generated
@ -782,6 +782,16 @@ namespace EduNetworkBuilder.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] Level6_ConnectTheLaptop {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Level6_ConnectTheLaptop", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
|
@ -433,4 +433,7 @@
|
||||
<data name="Level6_VlanRouting3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Level6_VlanRouting3.enbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="Level6_ConnectTheLaptop" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Level6_ConnectTheLaptop.enbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
1680
EduNetworkBuilder/Resources/Level6_ConnectTheLaptop.enbx
Normal file
1680
EduNetworkBuilder/Resources/Level6_ConnectTheLaptop.enbx
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,16 +4,16 @@
|
||||
<Network>
|
||||
<en_message>By default, switches are managed using the "Management Interface" IP Address. Most managed switches have a "Management VLAN" that you can communicate with the Management IP on. When that IP address is not accessible, you are locked out of the switch. You can also lock yourself out by forgetting the password, or forgetting the IP address.
|
||||
|
||||
In EduNetworkBuilder, the only real way to lock yourself out is by setting all the VLANs on the management interface to "forbidden", or, if you "firbid" the vlan that the management interface uses.
|
||||
In EduNetworkBuilder, the only real way to lock yourself out is by setting all the VLANs on the management interface to "forbidden", or, if you "forbid" the vlan that the management interface uses.
|
||||
|
||||
This puzzle has one switch that you have been locked out of. Reset it. Then, you need to set the trunk-port (port1) to tagged for both vlans, and set the port that pc2 is on to be on vlan 2.</en_message>
|
||||
This puzzle has one switch that you have been locked out of. Reset it (right-click). Then, you need to set the trunk-port (port1) to tagged for both vlans, and set the port that pc2 is on to be on vlan 2.</en_message>
|
||||
<en_title>VLAN Intro 3 Locked Out</en_title>
|
||||
<height>1024</height>
|
||||
<width>1024</width>
|
||||
<itemsize>100</itemsize>
|
||||
<showlabels>True</showlabels>
|
||||
<level>6</level>
|
||||
<sortorder>0.7</sortorder>
|
||||
<sortorder>3.2</sortorder>
|
||||
<uniqueidentifier>145</uniqueidentifier>
|
||||
<startinghelplevel>full</startinghelplevel>
|
||||
<vlansenabled>True</vlansenabled>
|
||||
|
@ -40,8 +40,6 @@
|
||||
<nictype>lo</nictype>
|
||||
<uniqueidentifier>147</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>lo0</nicname>
|
||||
<myip>
|
||||
@ -66,8 +64,6 @@
|
||||
<nictype>wan</nictype>
|
||||
<uniqueidentifier>150</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>wan0</nicname>
|
||||
<myip>
|
||||
@ -92,8 +88,6 @@
|
||||
<nictype>eth</nictype>
|
||||
<uniqueidentifier>148</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>eth0</nicname>
|
||||
<myip>
|
||||
@ -131,8 +125,6 @@
|
||||
<nictype>eth</nictype>
|
||||
<uniqueidentifier>149</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>eth1</nicname>
|
||||
<myip>
|
||||
@ -197,8 +189,6 @@
|
||||
<nictype>lo</nictype>
|
||||
<uniqueidentifier>143</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>lo0</nicname>
|
||||
<myip>
|
||||
@ -223,8 +213,6 @@
|
||||
<nictype>eth</nictype>
|
||||
<uniqueidentifier>144</uniqueidentifier>
|
||||
<usesdhcp>True</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>eth0</nicname>
|
||||
<myip>
|
||||
@ -264,7 +252,7 @@
|
||||
<nictype>lo</nictype>
|
||||
<uniqueidentifier>110</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>lo0</nicname>
|
||||
<myip>
|
||||
@ -289,7 +277,7 @@
|
||||
<nictype>management_interface</nictype>
|
||||
<uniqueidentifier>111</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>management_interface0</nicname>
|
||||
<myip>
|
||||
@ -314,7 +302,7 @@
|
||||
<nictype>port</nictype>
|
||||
<uniqueidentifier>112</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>port1</nicname>
|
||||
<myip>
|
||||
@ -341,7 +329,7 @@
|
||||
<nictype>port</nictype>
|
||||
<uniqueidentifier>113</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>port2</nicname>
|
||||
<myip>
|
||||
@ -368,7 +356,7 @@
|
||||
<nictype>port</nictype>
|
||||
<uniqueidentifier>114</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>port3</nicname>
|
||||
<myip>
|
||||
@ -395,7 +383,7 @@
|
||||
<nictype>port</nictype>
|
||||
<uniqueidentifier>115</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>port4</nicname>
|
||||
<myip>
|
||||
@ -422,7 +410,7 @@
|
||||
<nictype>port</nictype>
|
||||
<uniqueidentifier>116</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>port5</nicname>
|
||||
<myip>
|
||||
@ -449,7 +437,7 @@
|
||||
<nictype>port</nictype>
|
||||
<uniqueidentifier>117</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>port6</nicname>
|
||||
<myip>
|
||||
@ -476,7 +464,7 @@
|
||||
<nictype>port</nictype>
|
||||
<uniqueidentifier>118</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>port7</nicname>
|
||||
<myip>
|
||||
@ -519,7 +507,7 @@
|
||||
<nictype>lo</nictype>
|
||||
<uniqueidentifier>122</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>lo0</nicname>
|
||||
<myip>
|
||||
@ -544,7 +532,7 @@
|
||||
<nictype>eth</nictype>
|
||||
<uniqueidentifier>123</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>eth0</nicname>
|
||||
<myip>
|
||||
@ -585,7 +573,7 @@
|
||||
<nictype>lo</nictype>
|
||||
<uniqueidentifier>125</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>lo0</nicname>
|
||||
<myip>
|
||||
@ -610,7 +598,7 @@
|
||||
<nictype>eth</nictype>
|
||||
<uniqueidentifier>126</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>eth0</nicname>
|
||||
<myip>
|
||||
@ -651,7 +639,7 @@
|
||||
<nictype>lo</nictype>
|
||||
<uniqueidentifier>128</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>lo0</nicname>
|
||||
<myip>
|
||||
@ -676,7 +664,7 @@
|
||||
<nictype>eth</nictype>
|
||||
<uniqueidentifier>129</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>eth0</nicname>
|
||||
<myip>
|
||||
@ -717,7 +705,7 @@
|
||||
<nictype>lo</nictype>
|
||||
<uniqueidentifier>131</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>lo0</nicname>
|
||||
<myip>
|
||||
@ -742,7 +730,7 @@
|
||||
<nictype>eth</nictype>
|
||||
<uniqueidentifier>132</uniqueidentifier>
|
||||
<usesdhcp>False</usesdhcp>
|
||||
<encryptionkey />
|
||||
<ssid />
|
||||
<interface>
|
||||
<nicname>eth0</nicname>
|
||||
<myip>
|
||||
@ -863,6 +851,11 @@
|
||||
<dhost>pc1</dhost>
|
||||
<thetest>SuccessfullyPings</thetest>
|
||||
</nettest>
|
||||
<nettest>
|
||||
<shost>laptop0</shost>
|
||||
<dhost>pc3</dhost>
|
||||
<thetest>NeedsLocalIPTo</thetest>
|
||||
</nettest>
|
||||
<tag>VLAN</tag>
|
||||
<VLANName
|
||||
ID="1"
|
||||
|
@ -2,7 +2,7 @@
|
||||
<EduNetworkBuilder>
|
||||
<!--This is a network file for EduNetworkBuilder.-->
|
||||
<Network>
|
||||
<en_message>This map shows how VLANs affect DHCP. Change the ports on net_switch1 that are connected to the wireless access point and laptop1. The WAP does not know how to do VLANS, so you control the VLAN that the accesspoint is connected to on net_switch1. Untag the port for the vlan that the laptop is supposed to be connected to do, doing a dhcp-request after you change it.
|
||||
<en_message>This map shows how VLANs affect DHCP. Change the ports on net_switch1 that are connected to the wireless access point and laptop1. The WAP does not know how to do VLANS, so you control the VLAN that the accesspoint is connected to on net_switch1. Untag the port for the vlan that the laptop is supposed to be connected to do (mouse-over the laptop to see what it is supposed to be "local" to), doing a dhcp-request after you change it.
|
||||
For this map, the VLAN packets are displayed with the color of the PC on that VLAN. That will help you visualize when the packet is tagged and when it is not.</en_message>
|
||||
<en_title>Untagged ports and DHCP</en_title>
|
||||
<height>1024</height>
|
||||
|
Loading…
Reference in New Issue
Block a user