Showing posts with the label Subnetting

Get network interfaces description in Windows

Netsh is a command line tool that is very useful provided of course you know exactly on how to use it.
Below is an example on how to display the GUID and the description of the network interface card.
   netsh trace show interfaces
Sample output: Ethernet adapter Ethernet: Description:Intel(R) I350 Gigabit Network Connection Interface GUID:{1C8DC74A-0BCD-48FF-F3B7-26B1FF4D5650} Interface Index: 12 Interface Luid:0x8000008000000

Tunnel adapter isatap.{BCF65C9D-CB58-49F7-8BA1-88DBF2A6FBCE}: Description:Microsoft ISATAP Adapter #3 Interface GUID:{F8BB0A84-D5A4-CA93-BA100-27EF2898CC82} Interface Index: 19 Interface Luid:0x12000005000000
The GUID (globally unique identifier) is used to identify objects in Windows registry. The above command shows the description and the interface GUID, but the above command also can be used to sniff or capture traffic.
netsh trace start capture=YES report=YES persistent=YES
Netsh packet sniffing is quite handy because it's already built-in on the system and no …

PowerShell Get IP Address and Subnet mask

Get IP Address, MAC Address and Subnet mask.

It also displays the CIDR (Classless InterDomain Routing) notation.

Here's the script:

$nic_configuration = gwmi -computer .  -class "win32_networkadapterconfiguration" | Where-Object {$_.defaultIPGateway -ne $null}
$IP = $nic_configuration.ipaddress
write-output " IP Address : $IP"

$MAC_Address = $nic_configuration.MACAddress
write-output " MAC Address :  $MAC_Address"

$SubnetMask = $nic_configuration.ipsubnet

switch ($SubnetMask) {   {" Subnet mask is: or /32 "}   {" Subnet mask is:  or   /31 "}   {" Subnet mask is: or   /30 "}   {" Subnet mask is: or  /29 "}   {" Subnet mask is:   or   /28"}   {" Subnet mask is:   or   /27&q…

Show interface IP Address in Windows 10

Commands below work in Windows 10, I think it will also work in Windows 2012.

Displaying or show IP Address in Windows is quite straight forward using ipconfig /all command.
The command has the /all parameter so it will display the IP Address of all the interfaces on the machine.
Display IP Address of a specific interface in Windows via command line using “netsh” tool.
To display the interface IP Address you need to get the interface name.
Typing the command below will show all the interface name and its state whether its connected or disconnected.
 netsh interface show interface
Sample output: Admin State    State          Type             Interface Name ------------------------------------------------------------------------- Enabled        Connected      Dedicated        Ethernet Enabled        Connected      Dedicated        VMware Network Adapter VMnet1 Enabled        Connected      Dedicated        VMware Network Adapter VMnet8 Enabled        Connected      Dedicated        Wi-Fi …

Enable ICMP or Ping request on Windows

If you ping a remote computer but fails, it could be that the firewall does not allow ICMP protocol.

Enabling ICMP or ping requests is quite useful for troubleshooting purposes but it could be also a security issue.
To enable ping or ICMP in Windows Firewall with Advance security, can be done via command line or using the graphical interface.
Command line is quite useful if the setting has to be done repeatedly or it has to be done on multiple machines.
Command line will also be helpful if a setting has to be enabled or disabled at times. Graphical interface is of course the easiest method if it has to be done one time but if the setting has to be done a couple of times then command line or scripting is definitely a good choice unless the person loves to click and click.
Enable Ping response using command line: netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
Disable Ping response using command line: net…

JunOS DHCP set MAC or static binding

How to set a static binding in JunOS? How to set a reservation of MAC address in DHCP? How to configure DHCP manual bindings? Different ways of asking on how to do but only one  specific goal, to assign an IP Address to a specific MAC or hardware. In JunOS SRX firewalls type this command: set system services dhcp static-binding 01:02:03:09:0A:0B fixed-address IP Address of will be assigned to a device with this MAC or hardware identifier of 01:02:03:09:0A:0B . See reference below for more details: To do a reservation of MAC Address on Windows see below: Using Windows GUI see this link: The GUI instruction may change from version of the operating system but the logic on how to do it stays the same, you need to know the MAC address which will serve as an identifier so DHCP will know what IP Address will be …

PowerShell get DHCP enabled NIC

How to get NICs with DHCP enabled?

A one liner code to get DHCP network interfaces card and its IP Address settings. Get-WmiObject win32_networkadapterconfiguration | where {$_.DHCPEnabled -eq “True”}
To save a few more bytes used this code:
gwmi win32_networkadapterconfiguration | ? {$_.DHCPEnabled -eq “True”}
A quick and easy way to get DHCP enabled NICs with the help of PowerShell.
Sample output:
DHCPEnabled: True IPAddress: {} DefaultIPGateway : {} DNSDomain: CiscoFW_01 ServiceName: e1cexpress Description: Intel(R) 82579LM Gigabit Network Connection Index: 7
DHCPEnabled: True IPAddress: DefaultIPGateway : DNSDomain: ServiceName: BthPan Description: Bluetooth Device (Personal Area Network) Index: 22
DHCPEnabled: True IPAddress: DefaultIPGateway : DNSDomain: ServiceName: RTL8192su Description: TP-LINK 150Mbps Mini Wireless N USB Adapter Index: 23
DHCPEnabled: True IPAddress: DefaultIPGateway : DNSDomain: ServiceName: netr73 Description: D-Link Wir…

Wireless or Wi-Fi not working

Wireless connection or Wi-Fi connection gives easy convenience for moving Laptop computers inside the house or even in the office without losing internet connection.

If there are two or more Laptop computers and one of them is not able to connect to the internet or wireless connection, then for this kind of scenario the wireless router is working properly. Since other Laptop computers is able to connect to the Internet or Wi-Fi connection.

But if all of the wireless devices or laptop computers are not able to connect to the internet then it can be roll out that the router itself is having issues.

Troubleshooting wireless router is beyond the scope of this topic.

How to check or troubleshoot wireless connection issues?

Windows has a built-in wizard that will help to troubleshoot or check wireless issues.

A basic step to troubleshoot Wi-Fi or wireless connection if not working is to check:

- check if the wireless driver is installed properly or check whether the wireless device is disa…