Subnet: planning configuration

navybeansvietnameseNetworking and Communications

Oct 24, 2013 (3 years and 9 months ago)

79 views

Page
1

Subnet: planning


configuration

Step
-
by
-
Step Procedure

Planning to build subnet(s)


1.

Self
-
asking questions:



How many subnets am I going to build?



What will be IP range


IP mask for each subnet?



Which IP will be used for gateway on each subnet?



What is th
e topology for my network?



How many routers, switches, hubs will be used on my network?



What will be connection structure for my network (computers
-
hubs
-
switches
-
routers)?


2.

Set up computers
-

hubs
-

switches



The following websites could give you some help
on calculating range of IP and
Netmask for your subnets:


http://www.subnet
-
calculator.com/

http://www.subnetonline.com/subnet/step1.html




Try to use the first available IP address in your IP range for default
-
gateway. For
example: 192.168.10.1



Assign appr
opriate IP address, network mask and default gateway IP for every
machine



Connect computers of the same subnet to the same (tree of) hub, switches



Connect hub or switch to the right interface on router


Page
2


2.1.

configuration TCP/IP on a Windows base machine







Page
3




2.2.

configuration TCP/IP on a Linux base machine




Page
4



2.3.

configuration TCP/IP on a Solaris machine

The simplest way to configure network information for a Solaris machine is doing it at
installation time. The installer will ask you all information abou
t IP, router, netmask, … and
save them to the right place, into the right file. However if you need to reconfigure your
network later, use following instructions.


All of following files need to be added
WRITABLE

mode under
root

privileges. Using
command:
chmod +w <filename>


Create or Edit file /etc/inet/netmasks. File content will be in following format:

<network number>

<net mask>


For example:



192.168.4.0

255.255.255.0



Create or Edit file (/etc/inet/hosts). File content will be in following form
at and contains at least
localhost (127.0.0.1) and your machine:

<IP address: xxx.xxx.xxx.xxx>

<Host name>

<Alias>

For example:



127.0.0.1

Localhost


192.168.4.5

Solaris10_5

Loghost

192.168.4.2

Solaris10_2


192.168.4.3

Linux9_3



Create or Edit f
ile /etc/inet/ipnodes. File content will be in following format and contains at least
Page
5

localhost (127.0.0.1) and your machine:

For example:



127.0.0.1

Localhost


192.168.4.5

Solaris10_5

Loghost

192.168.4.2

Solaris10_2


192.168.4.3

Linux9_3



Create o
r Edit file /etc/resolv.conf. File content should have at least your name server in
following format:

<nameserver>

<IP address: xxx.xxx.xxx.xxx>


For example:



Solaris10_5

192.168.4.5



Create or Edit file /etc/defaultrouter. File content should hav
e IP address of the gateway
machine

For example:



192.168.4.1




Create or Edit file /etc/hostname.?????. Each network card on your machine will need to have
one hostname file associate with it. This file will help to have the interface added and
confi
gured automatically at boot time. The file name has two parts:
<hostname.><netcardtype>. For network card type, please check at sun.com website. The
content of this file is name of your machine:

For example:



Solaris10_5





3.

Set up router (Cisco C2600)



The following basic items need to be configured for a router

o

Setup basic parameters

Router> enable

Router# setup


---

System Configuration Dialog
---


Continue with configuration dialog? [yes/no]: yes


At any point you may enter a question mark '?
' for help.

Use ctrl
-
c to abort configuration dialog at any prompt.

Default settings are in square brackets '[]'.



Basic management setup configures only enough connectivity

for management of the system, extended setup will ask you

to configure each inter
face on the system


Would you like to enter basic management setup? [yes/no]: yes

Configuring global parameters:


Enter host name [Router]: GridRouter



The enable secret is a password used to protect access to


privileged EXEC and configuration modes.
This password, after


entered, becomes encrypted in the configuration.


Enter enable secret: password


Page
6


The enable password is used when you do not specify an


enable secret password, with some older software versions, and


some boot images.


Enter e
nable password: creugrid



The virtual terminal password is used to protect


access to the router over a network interface.


Enter virtual terminal password: password


Configure SNMP Network Management? [no]:
no

Enter interface name used to connect to
the

management network from the above interface summary:
FastEthernet0/0



Configuring interface FastEthernet0/0:

Use the 100 Base
-
TX (RJ
-
45) connector? [yes]:
yes

Operate in full
-
duplex mode? [no]:
no

Configure IP on this interface? [yes]:
yes

IP address
for this interface []:
192.168.10.100

Subnet mask for this interface [] :
255.255.255.0

Class C network is 192.168.102.0, 24 subnet bits; mask is /24



[0] Go to the IOS command prompt without saving this config.

[1] Return back to the setup without saving

this config.

[2] Save this configuration to nvram and exit.


Enter your selection [2]:
2

o

Setup Interfaces [IP


net mask


duplex


status]


Router# config terminal

Router(config)# interface Fast0/0

Router(config
-
if)# ip address 192.168.11.100 255.255.255
.0

Router(config
-
if)# duplex auto

Router(config
-
if)# no shutdown

Router(config
-
if)# keepalive

Router(config
-
if)# exit


Router(config)# interface Fast0/1

.....................................................

Router(config
-
if)# exit


repeat above steps for e
ach individual interfaces that you want to configure


Router(config)# exit


o

Setup Router protocol [ router rip


version 2]

Router(config)# ip routing

Router(config)# router rip

Router(config
-
router)# version 2

Router(config
-
router)#network 192.168.10.0

Ro
uter(config
-
router)#network 192.168.11.0

Router(config
-
router)#exit


o

Save current configuration

Router(config)# exit

Router# copy run star

Destination filename [startup
-
config]?

Building configuration...

[OK]

Router#

Page
7

4.

Example of GRID computing project sub
-
n
et



5.

Important notes



With machines that have more than 1 network cards and each network card was
configured to connect to a different subnet
-
gateway, routing from one subnet to
another on these machines may not success because of gateway confusing
probl
em. (if that machine is not a router)
Switch

Switch

Page
8

More information on Router protocol [ router rip


version 2]

(The following note is from Dr. Lee’s website about how to configure RIP)


After you set up your pod’s CISCO 2600 router, in order to advertise the
existenc
e of your subnet to devices outside of your subnet, you should use rip
(Routing Information Protocol) as follows.




Please refer the diagram in the hint entitled “
Frequently Used IOS Commands.


to
understand how to go into the router configuration mode.




Type the following command to enter the router configuration mode.


router rip




Once you entered the router configuration mod
e, please type the following to set up the version
of your rip protocol and advertise your subnet to devices in 190.111.0.0.


version 2

network 190.111.0.0

Section I.1

router rip

To configure the Routing Information Protocol (RIP) routing process, use the router rip
command in global
configuration mode. To turn off the RIP routing process, use the no form of this command.

router rip

no router rip


Syntax Description

This command has no arguments or keywords.


Defaults

No RIP routing process is defined.

Section I.2

Command
Modes

Global configuration


Command History

Release

Modification

10.0

This command was introduced.


Examples

The following example shows how to begin the RIP routing process:

router rip

Section I.3

network (RIP)

To specify a list of networks for the Routing

Information Protocol (RIP) routing process, use this form of the

network
command in router configuration mode. To remove an entry, use the no form of this command.

network
network
-
number

no
network
network
-
number


Syntax Description

network
-
number


IP
address of the network of directly connected networks.


Page
9

Defaults

No networks are specified.


Section I.4

Command Modes

Router configuration


Command History

Release

Modification

10.0

This command was introduced.


Usage Guidelines

The network number specif
ied must not contain any subnet information. There is no limit to the number of network
commands you can use on the router. RIP routing updates will be sent and received only through interfaces on this
network.

RIP sends updates to the interfaces in the s
pecified networks. Also, if an interface's network is not specified, it will not
be advertised in any RIP update.


Examples

The following example defines RIP as the routing protocol to be used on all interfaces connected to networks
10.99.0.0 and 192.168
.7.0:


router rip


network 10.99.0.0


network 192.168.7.0

Section I.5

version

To specify a RIP version used globally by the router, use the

version command in router configuration mode. Use the
no form of this command to restore the default value.

version
{
1

|

2
}

no version


Syntax Description

1

Specifies RIP Version 1.

2

Specifies RIP Version 2.


Defaults

The software receives RIP Version 1 and Version 2 packets, but sends only Version 1 packets.

Section I.6

Command Modes

Router configuration


Command History

Relea
se

Modification

11.1

This command was introduced.


Usage Guidelines

To specify RIP versions used on an interface basis, use the ip rip receive version and ip rip send version commands.


Examples

The following example enables the software to send a
nd receive RIP Version 2 packets:

version 2




Step
-
by
-
Step Procedure to recover lost password of Cisco C2600 router

Page
10


(http://www.cisco.com/warp/public/474/pswdrec_2600.shtml)

To recover your password, complete these steps:


2.

Attach a terminal or PC with t
erminal emulation to the console port of the router. Use these
terminal settings:



9600 baud rate



No parity



8 data bits



1 stop bit



No flow control

For more information on cabling, and details about how to connect a terminal to the
console port or the
AUX port, visit these links:

Cabling Guide for Console and AUX Ports on Cisco Routers

Connect a Terminal to Catalyst 2948G
-
L3, 4908G
-
L3, and 4840G Series Switches


Catalyst 8510CSR, and 8540CSR Switches Console Port Pinouts


3.

If you still have access to the router, type
show version

, and record the setting of the
configuration register. It is usually 0x2102 or 0x102. For a sample output of the
show
version

command, refer to the
Example of Password Recovery Procedure

section.


4.

If you do not have access to the router (because of a lost login or TACACS password), you
can safely consider that your configuration register is set to 0x2102. Use the power switch
to turn
off the router, and then turn it back on.

Important
: To simulate step 4 on a Cisco 6400, pull out and then replace the Node
Route Processor (NRP) or Node Switch Processor (NSP) card.

Important
: To simulate step 4 on a Cisco 6x00 using NI
-
2, pull out and
then replace the
NI
-
2 card.


5.

Press
Break

or (
Ctrl + Break
) on the terminal keyboard within 60 seconds of the power
-
up
to put the router into ROMMON. If the break sequence does not work, see
Standard Break
Key Sequence Combinations During Password Recovery

for other key combinations.


6.

Type
confreg

0x2142

at the
rommon 1>

prompt to boot from Flash without loading the
configuration.



7.

Type
reset

at the

rommon 2>

prompt. The router reboots but ignores its saved configuration.


8.

Type
no

after each setup question
or press
Ctrl
-
C

to skip the initial setup procedure.


9.

Type
enable

at the
Router>

prompt. You are taken to the ena
ble mode, and the
Router#

prompt appears.

Important
: Type
configure memory

or
copy

startup
-
config running
-
config

to copy
the nonvolatile RAM (NVRAM) into memory.

Do
not

type
configure terminal

.


10.

Type
write terminal

or
show running
-
config

.

The
show running
-
config

and
write terminal

commands show the configuration of the
router. In this configuration you see under all the interfaces the
shutdown

command, which
Page
11

means all interfaces are currently shut
down. Also, you can see the passwords (enable
password, enable secret, vty, console passwords, and so on) either in encrypted or
unencrypted format. The unencrypted passwords can be re
-
used, the encrypted ones will
have to be changed with a new one.


11.

Type

configure terminal

and make the changes. The prompt is now
hostname(config)#
.


12.

Type
enable secret

<
password
>

to change the
enable secret

password, for example.

Issue the
no shutdown

command on every interface that is used.

I
f you issue a
show ip interface

brief

command, every interface that you want to use should
be "up up".


13.

Type
config
-
register

0x2102
, or the value you recorded in
step 2
.

Press
Ctrl
-
Z

or
end

to leave the configuration mode.

The prompt is now changed to
hostname#
.


14.

Type
write memory

or
copy

running
-
config startup
-
config

to commit the changes.