Friday, May 21, 2010

ccna questions

All question And Answers About the CCNA

Thursday, May 20, 2010

NAT CONFIGURATION


Routers Used: 2621 w/ CISCO2600-MB-2FE and WIC-2T modules

IOS: c2600-i-mz.121-5.T9

Objective
  • In this lab, Port Address Translation (PAT) and port forwarding are configured.
Scenario
  • The International Travel Agency is planning to launch an informational Web site on a local Webserver for the general public. However, the one Class C address that has been allocated will not be sufficient for the users and devices the company has on this network. Therefore, a network is configured that will allow all internal company users access to the Internet and all Internet users access to the company’s informational Web server through static NAT and PAT. Internal user addresses must be translated to one legal global address and all Internet Users must access the informational Web server through the one legal global address as well.
Step 1
  • Build and configure the network according to the diagram. If you are using the configuration files from the previous lab, remove the NAT pool (public) and the static and dynamic NAT configurations. Use a Cisco router as WebServer if another Web server is not available.
  • Use ping to test connectivity between the NAT and ISP routers, between the Internal User and the NAT router, and between the Internet User and ISP.
  • Also check that WebServer server is accessible by connecting to it from the Internal User
    workstation with a browser using the WebServer IP address, 192.168.1.5.
Step 2
  • Since no routing protocol will be enabled, configure a default route to the Internet from the NAT router.
    NAT(config)#ip route 0.0.0.0 0.0.0.0 200.200.100.2
Step 3
  • Create a standard Access Control List that would enable all Internal Users access to the Internet.
    NAT(config)#access-list 1 permit 192.168.1.0 0.0.0.255
Step 4
  • Because a single inside global address, 200,200.100.1, will be used to represent multiple inside local addresses, 192.168.1.x, simultaneously, apply the access list and configure NAT overload on the serial 0/0 interface of the NAT router. In general, NAT can used to overload a pool of public addresses, when a single external address is overloaded. This is referred to as port address translation (PAT).
    NAT(config)#ip nat inside source list 1 interface s0/0 overload
  • This configuration allows Internal Users to access the Internet, but blocks external users from accessing internal hosts.
Step 5
  • Now specify the inside and outside NAT interfaces.
    NAT(config)#interface fastethernet 0/0
    NAT(config-if)#ip nat inside

    NAT(config-if)#interface serial 0/0
    NAT(config-if)#ip nat outside
  • Enter the command ping 200.200.50.2 from the Internal User workstation. Then, on the NAT router, enter the commands show ip nat translations, show ip nat statistics, and show ip nat translations verbose. Sample output follows.
    NAT#sh ip nat translations
    Pro Inside global Inside local Outside local Outside global
    icmp 200.200.100.1:27057 192.168.1.2:27057 200.200.50.2:27057 200.200.50.2:27057
    icmp 200.200.100.1:26033 192.168.1.5:26033 200.200.50.2:26033 200.200.50.2:26033
    icmp 200.200.100.1:27313 192.168.1.2:27313 200.200.50.2:27313 200.200.50.2:27313
    icmp 200.200.100.1:26289 192.168.1.5:26289 200.200.50.2:26289 200.200.50.2:26289

    NAT#show ip nat statistics
    Total active translations: 4 (0 static, 4 dynamic; 4 extended)
    Outside interfaces:
    Serial0/0
    Inside interfaces:
    FastEthernet0/0
    Hits: 85 Misses: 18
    Expired translations: 10
    Dynamic mappings:
    -- Inside Source
    access-list 1 interface Serial0/0 refcount 4

    NAT#show ip nat translations verbose
    Pro Inside global Inside local Outside local Outside global
    icmp 200.200.100.1:27057 192.168.1.2:27057 200.200.50.2:27057 200.200.50.2:2705
    create 00:00:45, use 00:00:45, left 00:00:14,
    flags:
    extended, use_count: 0
    icmp 200.200.100.1:26033 192.168.1.5:26033 200.200.50.2:26033 200.200.50.2:2603
    create 00:00:49, use 00:00:49, left 00:00:10,
    flags:
    extended, use_count: 0
    icmp 200.200.100.1:27313 192.168.1.2:27313 200.200.50.2:27313 200.200.50.2:2731
    create 00:00:45, use 00:00:44, left 00:00:15,
    flags:
    extended, use_count: 0
    icmp 200.200.100.1:26289 192.168.1.5:26289 200.200.50.2:26289 200.200.50.2:2628
    create 00:00:49, use 00:00:48, left 00:00:11,
    flags:
    extended, use_count: 0
Step 6
  • Internet users need access to the informational Web server through 200.200.100.1 through port 80. Configure PAT so that Internet users are directed to the informational Web server, 192.168.1.5, when they connect to the IP address 200.200.100.1 through a web browser.
    NAT(config)#ip nat inside source static tcp 192.168.1.5 80 200.200.100.1 80
    extendable
  • The extendable keyword at the end of this static NAT command causes the router to reuse the global address of an active translation and save enough information to distinguish it from another translation entry. This command has the effect of translating external attempts to connect to port 80/IP address 200.200.100.1 to internal attempts to connect to port 80/IP address 192.168.1.5. The process of performing NAT translations based on the value of the incoming port number of an IP packet is called port forwarding.
Step 7
  • Successful configuration of port forwarding is indicated by being able to reach the informational Web server from the Internet User workstation with a Web browser using the inside global address of 200.200.100.1.
Download
Network Address Translation – Port Address Translation and Port Forwarding

PAT configration


Routers Used: 2621 w/ CISCO2600-MB-2FE and WIC-2T modules

IOS: c2600-i-mz.121-5.T9

Objective
  • In this lab, Port Address Translation (PAT) and port forwarding are configured.
Scenario
  • The International Travel Agency is planning to launch an informational Web site on a local Webserver for the general public. However, the one Class C address that has been allocated will not be sufficient for the users and devices the company has on this network. Therefore, a network is configured that will allow all internal company users access to the Internet and all Internet users access to the company’s informational Web server through static NAT and PAT. Internal user addresses must be translated to one legal global address and all Internet Users must access the informational Web server through the one legal global address as well.
Step 1
  • Build and configure the network according to the diagram. If you are using the configuration files from the previous lab, remove the NAT pool (public) and the static and dynamic NAT configurations. Use a Cisco router as WebServer if another Web server is not available.
  • Use ping to test connectivity between the NAT and ISP routers, between the Internal User and the NAT router, and between the Internet User and ISP.
  • Also check that WebServer server is accessible by connecting to it from the Internal User
    workstation with a browser using the WebServer IP address, 192.168.1.5.
Step 2
  • Since no routing protocol will be enabled, configure a default route to the Internet from the NAT router.
    NAT(config)#ip route 0.0.0.0 0.0.0.0 200.200.100.2
Step 3
  • Create a standard Access Control List that would enable all Internal Users access to the Internet.
    NAT(config)#access-list 1 permit 192.168.1.0 0.0.0.255
Step 4
  • Because a single inside global address, 200,200.100.1, will be used to represent multiple inside local addresses, 192.168.1.x, simultaneously, apply the access list and configure NAT overload on the serial 0/0 interface of the NAT router. In general, NAT can used to overload a pool of public addresses, when a single external address is overloaded. This is referred to as port address translation (PAT).
    NAT(config)#ip nat inside source list 1 interface s0/0 overload
  • This configuration allows Internal Users to access the Internet, but blocks external users from accessing internal hosts.
Step 5
  • Now specify the inside and outside NAT interfaces.
    NAT(config)#interface fastethernet 0/0
    NAT(config-if)#ip nat inside

    NAT(config-if)#interface serial 0/0
    NAT(config-if)#ip nat outside
  • Enter the command ping 200.200.50.2 from the Internal User workstation. Then, on the NAT router, enter the commands show ip nat translations, show ip nat statistics, and show ip nat translations verbose. Sample output follows.
    NAT#sh ip nat translations
    Pro Inside global Inside local Outside local Outside global
    icmp 200.200.100.1:27057 192.168.1.2:27057 200.200.50.2:27057 200.200.50.2:27057
    icmp 200.200.100.1:26033 192.168.1.5:26033 200.200.50.2:26033 200.200.50.2:26033
    icmp 200.200.100.1:27313 192.168.1.2:27313 200.200.50.2:27313 200.200.50.2:27313
    icmp 200.200.100.1:26289 192.168.1.5:26289 200.200.50.2:26289 200.200.50.2:26289

    NAT#show ip nat statistics
    Total active translations: 4 (0 static, 4 dynamic; 4 extended)
    Outside interfaces:
    Serial0/0
    Inside interfaces:
    FastEthernet0/0
    Hits: 85 Misses: 18
    Expired translations: 10
    Dynamic mappings:
    -- Inside Source
    access-list 1 interface Serial0/0 refcount 4

    NAT#show ip nat translations verbose
    Pro Inside global Inside local Outside local Outside global
    icmp 200.200.100.1:27057 192.168.1.2:27057 200.200.50.2:27057 200.200.50.2:2705
    create 00:00:45, use 00:00:45, left 00:00:14,
    flags:
    extended, use_count: 0
    icmp 200.200.100.1:26033 192.168.1.5:26033 200.200.50.2:26033 200.200.50.2:2603
    create 00:00:49, use 00:00:49, left 00:00:10,
    flags:
    extended, use_count: 0
    icmp 200.200.100.1:27313 192.168.1.2:27313 200.200.50.2:27313 200.200.50.2:2731
    create 00:00:45, use 00:00:44, left 00:00:15,
    flags:
    extended, use_count: 0
    icmp 200.200.100.1:26289 192.168.1.5:26289 200.200.50.2:26289 200.200.50.2:2628
    create 00:00:49, use 00:00:48, left 00:00:11,
    flags:
    extended, use_count: 0
Step 6
  • Internet users need access to the informational Web server through 200.200.100.1 through port 80. Configure PAT so that Internet users are directed to the informational Web server, 192.168.1.5, when they connect to the IP address 200.200.100.1 through a web browser.
    NAT(config)#ip nat inside source static tcp 192.168.1.5 80 200.200.100.1 80
    extendable
  • The extendable keyword at the end of this static NAT command causes the router to reuse the global address of an active translation and save enough information to distinguish it from another translation entry. This command has the effect of translating external attempts to connect to port 80/IP address 200.200.100.1 to internal attempts to connect to port 80/IP address 192.168.1.5. The process of performing NAT translations based on the value of the incoming port number of an IP packet is called port forwarding.
Step 7
  • Successful configuration of port forwarding is indicated by being able to reach the informational Web server from the Internet User workstation with a Web browser using the inside global address of 200.200.100.1.
Download
Network Address Translation – Port Address Translation and Port Forwarding

Tuesday, May 18, 2010

how to know the ip add of sender

Finding IP Address Of the Sender In Hotmail!!

# Log into your Hotmail account with your username and password.
# Click on the Mail tab on the top.
# Open the mail.
# If you do not see the headers above the mail message, your headers are not displayed . To display the headers,

* Click on Options on the top-right corner
* In the Mail Options page, click on Mail Display Settings
* In Message Headers, make sure Advanced option is checked.
* Click on Ok button
* Go back to the mails and open that mail.

# If you find a header with X-Originating-IP: followed by an IP address, that is the sender's IP address

* Hotmail headers : Daniel ,In this case the IP address of the sender is [68.34.60.59]. This is be the IP address of the sender.

# If you find a header with Received: from followed by a Gmail proxy like this

* Hotmail headers : Daniel
* Look for Received: from followed by IP address within square brackets[]. In this case, the IP address of the sender is [69.140.7.58].

# Or else if you have headers like this

* Hotmail headers : Daniel
* Look for Received: from followed by IP address within square brackets[].
In this case, the IP address of the sender is [61.83.145.129] .

# If you have multiple Received: from headers, eliminate the ones that have proxy.anyknownserver.com.

Finding IP Address of the sender in Yahoo Mail!!
# Log into your Yahoo! mail with your username and password.
# Click on Inbox or whichever folder you have stored your mail.
# Open the mail.
# If you do not see the headers above the mail message, your headers are not displayed . To display the headers,

* Click on Options on the top-right corner
* In the Mail Options page, click on General Preferences
* Scroll down to Messages where you have the Headers option
* Make sure that Show all headers on incoming messages is selected
* Click on the Save button
* Go back to the mails and open that mail.

# You should see similar headers like this:

* Yahoo! headers : Daniel.

# Look for Received: from followed by the IP address between square brackets [ ]. Here, it is 202.65.138.109.
# That is be the IP address of the sender!


Finding IP Address of the sender in Gmail !!

When you receive an email, you receive more than just the message. The email comes with headers that carry important information that can tell where the email was sent from and possibly who sent it. For that, you would need to find the IP address of the sender. The tutorial below can help you find the IP address of the sender.

* Log into your Gmail account with your username and password.
* Open the mail.
* To display the headers,
o Click on More options corresponding to that thread. You should get a bunch of links. Click on Show original
* You should get headers like this:
o Gmail headers : Daniel
* Look for Received: from followed by a few hostnames and an IP address between square brackets. In this case, it is 65.119.112.245.
* That is be the IP address of the sender!!

NOTE:=
This will not work if the sender uses anonymous proxy servers.

Monday, May 3, 2010

CCIE EIGRP METRIC CALCULATION

One of the annoying fileds in my opinion is calculation, I hate them! in my mind it is just in the way of the cool stuff. but unfurtunetly to get to the cool stuf you need to calculate.

so I would like to start by giving you a little review and may be more indepth look over EIGRP Metric, as we all should know EIGRP is a Hybrid Routing Protocol that use a Composite Metric in his DUAL Diffusing Update Algorithm. the Composite metric is composed (good word selection :-)!?) from K Values.

K1 K2 K3 K4 K5

K1 = Bandwidth = 1 meaning it is used in the calculation by default.

K2 = load = 0 you gust it, meaning that is not participating in the calculation by default.

K3 = Delay = 1 you can take it from here

K4 = Reliability = 0

K5 = MTU = 0

the K values tells us if the value is participating in the calculation or not and what is the weight of the value, meaning that if you set K1 to 3 then it means that the weight of K1 will be 3 times more "important" or in other words it will take the BW * 3.

So now we know what are the "K" Values we need to know how to calculate:


well I will not endolge you with long version of the formula as it is hardly ever use (by hardly I mean I never seen it fully used).

Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]

in the attached picture I draw a small network to demonstrate what I mean to get from R1 to R3 netwrok 3.3.3.0/24

you have the following options:
R1 -> R2 -> R3
The lowes bandwith in that path is 64Kbps
The Delay is 20000 for the 64Kbps link 100 for the 100 Mbps linke and another 100 for the 3.3.3.0/24 network link also 100Mbps = 20200 microseconds delay.

so now lets put all into the formula:

Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]
Metric = [256 * (10^7/64) + 256 * (20000 + 100 + 100)]
Metric = [256 * (156250) + 256 * (20200)]
Metric = [40000000 + 5171200]
Metric = 45171200 = FD Feasable Distance (I will Talk about this in a bit)

R1 -> R4 -> R3

Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]
Metric = [256 * (10^7/64) + 256 * (20000 + 1000 + 100)]

! note that now you have 1000 in the path as it is a regular 10 Mbps Ethernet
Metric = [256 * (156250) + 256 * (21100)]
Metric = [40000000 + 5401600]

Metric = 45401600 = FD

R1 -> R2 -> R4 -> R3
Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]
Metric = [256 * (10^7/64) + 256 * (20000 + 20000 + 20000 + 100)]
Metric = [256 * (156250) + 256 * (60100)]
Metric = [40000000 + 15385600]

Metric = 55385600 = FD

R1 -> R4 -> R2 -> R3 I think you should do it now, you should get the point of the calculation

Now that have an idea how to calculate we need to see what route is preferd, in that senarion it is easy but in complex networks this basics can help us understand the proccess (leave the calc to the router).

FD as I was mentioning this Feasable Distance is the Metric that our router see from his outgoing interface to the point he wish to go, also caled end-to-end metric.

AD Advertised Distance that is the Distance we recive from our directly connected neighbor for the path we wish to go.

so for FD of R1 ->R2 ->R3 we get an AD of R2->R3.

FS Feasible Successor is the Router that is chosen by us to be the next hop to the Destination Prefix.

FC Feasible Condition is a rule that tells us in a very logical way to select a FS he must send to us an AD that is lower then the FD.

if we received from R4 for example a AD higher then the FD that we had already in our topology table to get to R3 then we would not consider him to be a Feasible Successor.

so final step lets take the Paths and FD and Calculate the AD and see what path sould we go as I am already exited where to go from now:

Now our AD for the Paths sent to R1:

R2 -> R3
Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]
Metric = [256 * (10^7/100000) + 256 * (100 + 100)]
Metric = [256 * (100) + 256 * (200)]
Metric = [25600 + 51200]

Metric = 76800 = AD
Metric = 45171200 =FD


R4 -> R3
Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]
Metric = [256 * (10^7/64) + 256 * (20000 + 100)]
Metric = [256 * (156250) + 256 * (20100)]

Metric = [40000000 + 5145600]
Metric = 45145600 = AD
Metric = 45401600 = FD


R1 -> R2 -> R4 -> R3
Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]
Metric = [256 * (10^7/64) + 256 * (20000 + 20000 + 20000 + 100)]
Metric = [256 * (156250) + 256 * (60100)]
Metric = [40000000 + 15385600]

Metric = 55385600 Here we can clearly see that there is not way that this route can meet the FC.
So we have a winner:
Metric = 76800 = AD
Metric = 45171200 =FD

to get to R3 3.3.3.0/24 R1 will take the path R1 ->R2 -> R3.
if it will fail then the path R1 ->R4->R3 will be taken as he still qualified to meet then FC for FS

FS Feasible Successor the second path in the topology that is set only of FC are met.

I hope this was an intersting article :-)