0% found this document useful (0 votes)
18 views1 page

Networking Sample

Uploaded by

Pei Cheng Wu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Networking Sample

Uploaded by

Pei Cheng Wu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Networking Sample 1

1) We list out the network adapters available on the server Find the interface to set by
executing Get-NetIPInterface:

2) Configure the identified interface with IPv4 address and DNS targets for the specified
interface.

Set the IP information using New-NetIPAddress:


New-NetIPAddress -AddressFamily IPv4 -IPAddress 10.10.10.10
-PrefixLength 24 -InterfaceAlias Ethernet

Set DNS Servers using Set-DnsClientServerAddress:


Set-DnsClientServerAddress -InterfaceAlias Ethernet
-ServerAddresses "10.10.10.10","10.10.10.11"

3) Identify this route as the default route, or default gateway.

Set the default route using New-NetRoute:


New-NetRoute -DestinationPrefix "0.0.0.0/0" -NextHop "10.10.10.1"
-InterfaceAlias Ethernet

4) For making the changes in relation to IPv6, the following are examples of configuring IPv6
on the same host:

New-NetIPAddress -AddressFamily IPv6 -IPAddress 2001:db8:1::10 `


-PrefixLength 64 -InterfaceAlias Ethernet

New-NetRoute -DestinationPrefix ::/0 -NextHop 2001:db8:1::1 `


-InterfaceAlias Ethernet

Set-DnsClientServerAddress -InterfaceAlias Ethernet `


-ServerAddresses "2001:db8:1::10","2001:db8:1::11"

For Additional IP addresses: By using the New-NetIPAddress function, an interface


can be configured with multiple IP addresses simultaneously.
New-NetIPAddress -AddressFamily IPv4 -IPAddress 10.10.10.250
-PrefixLength 24 -InterfaceAlias Ethernet

Using get-route will show all the routes that are defined on a system.

You might also like