计算机网络知识点,期末

  • 计算机网络做成原理期末考试知识点***

填空:

1.A(protocol协议)is an agreement between the communicating peers on how communication is to proceed
2.Connections are established in TCP by means of(three)between the server and the client
3.Guided media, such as(Twisted Pair双绞线), Coaxial Cable and Fiber Optics
4.IPv6 address is(128)bit
5.In the WWW service, Pages are named using(URL), which includes three parts: protocol, the hostname and the page s path
6.Network security problems can be divided roughly into three aspects:Confidentiality、Integrity and(Availability可用性
7.Two types of links: one is point-to-point ,the other one is(broadcast广播)
8.The OSI model has(seven)layers
9.The processing unit in the data link layer is the (frame帧
10.The processing unit of the network layer is the(packet包
11.The data link layer has two sublayers: logical link control and (media access control(MAC)截止访问控制MAC子层)
12.The(ICMP),is used by hosts to test the Network connectivity, for example, when running a ping command, an error such as “Destination unreachable” may occur
13.The range of frequencies transmitted without being strongly attenuated is called the(bandwidth宽带)
14.(ARP)solves the problem of finding out which Ethernet address corresponds to a given IP address
15.(VPN)is a means of carrying private traffic over a public network

简答:

1.An autonomous system has five local area networks. The number of IP addresses required for each LAN is 20. The IP address block assigned to the autonomous system is 61.145.120.0/24. Try to give the address blocks(including netmask ) for each LAN.

2.Please point out the difference between TCP and UDP.
面向连接/面向无连接
传输效率相对低/传输效率相对高
提供可靠的服务/不可靠的服务
点到点/一对多和一对—
3.What is the socket?
套接字是通信的基石,是支持TCP/IP协议的网络通信的基本操作单元
他是网络通信过程中,端点的抽象表示
包含五种信息:使用的协议、本地主机的IP地址、本地进程端口、远地主机IP地址、远地进程的协议端口
4.The TCP/IP Reference Model has five layers, please write out each layer of the TCP/IP Model.
从下往上每一层为:物理层、数据链路层、网络层、传输层、应用层

判断:1.CSMA/CD is an important protocol widely used in the Ethernet√
2.DNS is an application-layer protocol that maps host names to IP addresses√
3…DES is an important public-key algorithm and much practical security is based on it X
4.Firewall is a very important network security device√
5.If an HTTP server is serving 1000 clients, then at least 1000 sockets are open at the server√
6.Python is not an object oriented computer programming language √
7.RIP and OSPF are static routing protocols X
8.Switches operate in the network layer X
9.TCP uses a sliding window to complete the flow control of end-to-end√
10.The first computer network emerged in 1969,namely ARANET√
11.The ports of 0-1023 are Well-known ports, can be used by any application√
12.UDP is designed to provide a reliable end-to-end byte stream transmission X
13.WLAN uses optical fiber as a transmission medium X
14.When a host in a private network want to communicate with a host in the Internet, NAT can be used√
15.When web page is transmitted over SSL, the protocol used is HTTP X

选择:1.In common network services, web services use the ( HTTP) protocol
2.In the TCP/IP protocol, the port address with(16)bits length
3.In the TCP header, the (ACK) field specifies the number of the next byte expected
4.Which one is not network interconnection device?(mouse)
5.Which is a MAC address ?(FC-F8-AE-D3-BE-2A)
6.When using super scan to scan the target network, it is found that a host is open on ports 25 and 110, which are most likely (Email) servers
7.Which of the following routing protocol is belong to EGP?(BGP)
8.The main task of the(Transport) layer is to provide for the reliable transfer of information across the physical link
9.The data link layer uses(CRC) for error detection
10.The ( ping) instruction is used to detect the connectivity of the destination host
11.The IP address of a server is 128.36.199.3, This IP address belongs to(class B)
12…There are(two)protocols available in the transport layer
13.The popular point-to-point DLC protocol is(PPP).
14.(IEEE802.3z) is not belong the WLAN series
15.(SYN) an attack is an attack by creating a large number of “semi-connections” that can be attacked on any host connected to the Internet and providing TCP based network services

大题:

Use Python to write a client and server program based on TCP protocol to achieve mutual communication.
Requirement:
1)The client can send messages to the server, and the server can display the message sent by the client.
2)When the client sends “Q”, it will interrupt the socket connection and the program automatically quit.

// server
import socket

def serve(ip, port):
tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcp_socket.bind((ip, port))
tcp_socket.listen()
client_socket, client_addr = tcp_socket.accept()
while True:
recv_data = client_socket.recv(1024)
if recv_data:
print(“客户端:”, recv_data.decode())
else:
Break

def main():
serve(“127.0.0.1”, 9999)

if name == ‘main’:
main()

// client
import socket

def client(ip, port):
tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcp_socket.bind((ip, port))
tcp_socket.connect((“127.0.0.1”, 9999))
while True:
msg = input(“请输入要发送内容:”)
if msg == “Q”:
tcp_socket.close()
break
tcp_socket.send(msg.encode())

def main():
client(“127.0.0.1”, 9998)

if name == ‘main’:
main()

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值