conf t int fa 0/0 no shut ip address dhcp ip domain-lookup
conf t (global configuration mode)It remains to check whether there is an Internet connection. To do this, ping any site. For example, google.
int fa 0/0 (interface configuration mode)
no shut (interface enable command)
ip address dhcp (indicates that the interface receives an IP address via DHCP)
ip domain-lookup (permissions of host names to IP addresses and vice versa)
Connected to Dynamips VM "R1" (ID 0, type c3600) - Console port Press ENTER to get the prompt. This product contains cryptographic features and is subject to United States and local country laws governing import, export, transfer and use. Delivery of Cisco cryptographic products does not imply third-party authority to import, export, distribute or use encryption. Importers, exporters, distributors and users are responsible for compliance with US and local country laws. By using this product you agree to comply with applicable laws and regulations. If you are unable to comply with US and local laws, return this product immediately. A summary of US laws governing Cisco cryptographic products may be found at: http://www.cisco.com/wwl/export/crypto/tool/stqrg.html If you require further assistance please contact us by sending email to export@cisco.com. Cisco 3660 (R527x) processor (revision 1.0) with 124928K/6144K bytes of memory. Processor board ID FTX0945W0MY R527x CPU at 250MHz, Implementation 40, Rev 1.2, 512KB L2 Cache 3660 Chassis type: ENTERPRISE 2 FastEthernet interfaces DRAM configuration is 64 bits wide with parity enabled. 125K bytes of NVRAM. 8192K bytes of processor board System flash (Read/Write) SETUP: new interface FastEthernet0/0 placed in "shutdown" state SETUP: new interface FastEthernet0/1 placed in "shutdown" state Press RETURN to get started! *Mar 1 00:00:03.091: %LINEPROTO-5-UPDOWN: Line protocol on Interface VoIP-Null0, changed state to up *Mar 1 00:00:03.183: %SYS-5-CONFIG_I: Configured from memory by console *Mar 1 00:00:03.319: %LINEPROTO-5-UPDOWN: Line protocol on Interface IPv6-mpls, changed state to up *Mar 1 00:00:03.463: %SYS-5-RESTART: System restarted -- Cisco IOS Software, 3600 Software (C3660-A3JK9S-M), Version 12.4(15)T14, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2010 by Cisco Systems, Inc. Compiled Tue 17-Aug-10 11:00 by prod_rel_team *Mar 1 00:00:03.467: %SNMP-5-COLDSTART: SNMP agent on host R1 is undergoing a cold start *Mar 1 00:00:03.491: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down *Mar 1 00:00:03.503: %CRYPTO-6-GDOI_ON_OFF: GDOI is OFF *Mar 1 00:00:03.507: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF *Mar 1 00:00:03.507: %CRYPTO-6-GDOI_ON_OFF: GDOI is OFF *Mar 1 00:00:03.507: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF *Mar 1 00:00:03.543: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down *Mar 1 00:00:04.491: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down *Mar 1 00:00:04.543: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down R1# R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#int fa 0/0 R1(config-if)#no shut R1(config-if)# *Mar 1 00:00:45.887: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up *Mar 1 00:00:46.887: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up R1(config-if)#ip address dhcp R1(config-if)# *Mar 1 00:01:13.071: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP address 192.168.137.31, mask 255.255.255.0, hostname R1 R1(config-if)#ip domain-lookup R1(config)#^Z R1# *Mar 1 00:02:15.551: %SYS-5-CONFIG_I: Configured from console by console R1#ping google.ru Translating "google.ru"...domain server (192.168.137.1) [OK] Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 173.194.73.94, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/35/44 ms R1#
Source: https://habr.com/ru/post/350730/
All Articles