SlideShare une entreprise Scribd logo
1  sur  11
Télécharger pour lire hors ligne
Network Project
유민호
lights8615@gmail.com
https://github.com/lights93/network_project
C o n t e n t s
01 개요
02 소개
03 코드 설명
개요
• 이름: Network Project(CSMA/CD + IP + TCP)
• 개발 인원: 1
• 기간: 2016.09 ~ 2016.12
• 개발 환경: sublime text3, ubuntu
• 사용 언어: python
• 링크: https://github.com/lights93/network_project
소개
• 네트워크 구조
• router – 파란색
• end_node – 노란색
• port_number – 초록색
• bandwidth – 검은색
오른쪽의 그림과 같은 네트워크를
가정하여 구현했습니다.
소개
• CSMA/CD 구현 내용
• 전송 중인 노드에서 다른 노드의 패킷의 첫 부분이 도착했을 때,
collision이 발생한 것을 확인하도록 구현
• CSMA/CD 지속 방식 중에 p-persistent를 이용하여 재충돌 방지
소개
• IP(link state routing protocol) 구현 내용
• 각 router에서 다른 router로 가는 최단 경로를 Dijkstra 알고리즘으로
구하고, routing table 생성
• router들의 연결이 끊어지거나 새로 생길 수 있으므로, 각 router에서
주기적으로 version이 있는 패킷을 보내 자신의 정보를 알리도록 구현
소개
• TCP 구현 내용
• 160bit의 TCP header 구현
• connection establishment process 구현
• connection termination process 구현
• congestion control 구현
• flow control 구현
코드 설명
• 다른 노드로 부터 packet의 시작
부분이 도착했을 때, 현재 노드에서
도 패킷 전송을 하려고 했을 때,
collision임을 확인합니다.
• collision이 끝났을 때 p-persistent
방식으로 다시 전송을 시도하도록
타이머를 설정했습니다.
코드 설명
• router의 연결이 끊어졌을 때,
r_list(라우터 리스트)에서 해당 router를
뺀 뒤, Dijkstra 알고리즘을 사용하여
새로운 router table을 생성합니다.
• 새로운 router가 연결됐을 때,
r_list(라우터 리스트)에 새로운 router를
추가한 뒤, Dijkstra 알고리즘을
사용하여 새로운 router table을
생성합니다.
코드 설명
• 패킷을 받았을 때 TCP헤더를
확인합니다. ACK, SYN, FIN을
확인하여 받은 패킷을 상황에
맞게 처리합니다.
코드 설명
• 전송하기 전에 받을 노드에 패킷을
저장할 공간이 있는 지 확인합니다.
공간이 없다면 probe 패킷을 보내
공간이 생기는 것을 확인합니다.
• timeout으로 재전송할 때는
congestionwindow를 1로 설정하고,
duplicated ack로 재전송할 때는
congestionwindow를 threshold
+2의 값으로 설정합니다.

Contenu connexe

Tendances

비디오 코덱
비디오 코덱비디오 코덱
비디오 코덱greenday96
 
150416 OpenStack Networking with Neutron Jieun, Kim
150416 OpenStack Networking with Neutron Jieun, Kim150416 OpenStack Networking with Neutron Jieun, Kim
150416 OpenStack Networking with Neutron Jieun, Kimjieun kim
 
Hm10 Research sheets
Hm10 Research sheetsHm10 Research sheets
Hm10 Research sheetsyyooooon
 
Wire shark 사용법 및 네트워크 개론 살짝 설명
Wire shark 사용법 및 네트워크 개론 살짝 설명Wire shark 사용법 및 네트워크 개론 살짝 설명
Wire shark 사용법 및 네트워크 개론 살짝 설명진우 이
 
05_Reliable UDP 구현
05_Reliable UDP 구현05_Reliable UDP 구현
05_Reliable UDP 구현noerror
 
20150525 open flow1.3_ryu_sdn_link aggregation 1_김지은
20150525 open flow1.3_ryu_sdn_link aggregation 1_김지은20150525 open flow1.3_ryu_sdn_link aggregation 1_김지은
20150525 open flow1.3_ryu_sdn_link aggregation 1_김지은jieun kim
 
TCP/IP Protocol - JAVA
TCP/IP Protocol - JAVATCP/IP Protocol - JAVA
TCP/IP Protocol - JAVAcooddy
 
리눅스 소켓 프로그래밍 기초
리눅스 소켓 프로그래밍 기초리눅스 소켓 프로그래밍 기초
리눅스 소켓 프로그래밍 기초Yu Yongwoo
 
뇌자T 1.네트워크와 tcpip
뇌자T   1.네트워크와 tcpip뇌자T   1.네트워크와 tcpip
뇌자T 1.네트워크와 tcpipsj k
 
HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형
HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형
HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형Minchul Jung
 
Going asynchronous with netty - SOSCON 2015
Going asynchronous with netty - SOSCON 2015Going asynchronous with netty - SOSCON 2015
Going asynchronous with netty - SOSCON 2015Kris Jeong
 
R2서버정진욱
R2서버정진욱R2서버정진욱
R2서버정진욱jungjinwouk
 
Hadoop io
Hadoop ioHadoop io
Hadoop iokidoki
 
Android Push Server & MQTT
Android Push Server & MQTTAndroid Push Server & MQTT
Android Push Server & MQTT광운 이
 
[14.10.20] 아! 그거...모르겠습니다 - TLS(devrookie)
[14.10.20] 아! 그거...모르겠습니다 - TLS(devrookie)[14.10.20] 아! 그거...모르겠습니다 - TLS(devrookie)
[14.10.20] 아! 그거...모르겠습니다 - TLS(devrookie)해강
 
[20160620]CCTV 구현 자료
[20160620]CCTV 구현 자료[20160620]CCTV 구현 자료
[20160620]CCTV 구현 자료Kyunghee Univ
 

Tendances (20)

비디오 코덱
비디오 코덱비디오 코덱
비디오 코덱
 
150416 OpenStack Networking with Neutron Jieun, Kim
150416 OpenStack Networking with Neutron Jieun, Kim150416 OpenStack Networking with Neutron Jieun, Kim
150416 OpenStack Networking with Neutron Jieun, Kim
 
Hm10 Research sheets
Hm10 Research sheetsHm10 Research sheets
Hm10 Research sheets
 
네트워크 기본
네트워크 기본네트워크 기본
네트워크 기본
 
Wire shark 사용법 및 네트워크 개론 살짝 설명
Wire shark 사용법 및 네트워크 개론 살짝 설명Wire shark 사용법 및 네트워크 개론 살짝 설명
Wire shark 사용법 및 네트워크 개론 살짝 설명
 
05_Reliable UDP 구현
05_Reliable UDP 구현05_Reliable UDP 구현
05_Reliable UDP 구현
 
20150525 open flow1.3_ryu_sdn_link aggregation 1_김지은
20150525 open flow1.3_ryu_sdn_link aggregation 1_김지은20150525 open flow1.3_ryu_sdn_link aggregation 1_김지은
20150525 open flow1.3_ryu_sdn_link aggregation 1_김지은
 
TCP/IP Protocol - JAVA
TCP/IP Protocol - JAVATCP/IP Protocol - JAVA
TCP/IP Protocol - JAVA
 
리눅스 소켓 프로그래밍 기초
리눅스 소켓 프로그래밍 기초리눅스 소켓 프로그래밍 기초
리눅스 소켓 프로그래밍 기초
 
뇌자T 1.네트워크와 tcpip
뇌자T   1.네트워크와 tcpip뇌자T   1.네트워크와 tcpip
뇌자T 1.네트워크와 tcpip
 
RabbitMQ
RabbitMQRabbitMQ
RabbitMQ
 
Warp
WarpWarp
Warp
 
HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형
HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형
HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형
 
Going asynchronous with netty - SOSCON 2015
Going asynchronous with netty - SOSCON 2015Going asynchronous with netty - SOSCON 2015
Going asynchronous with netty - SOSCON 2015
 
R2서버정진욱
R2서버정진욱R2서버정진욱
R2서버정진욱
 
Network researching
Network researchingNetwork researching
Network researching
 
Hadoop io
Hadoop ioHadoop io
Hadoop io
 
Android Push Server & MQTT
Android Push Server & MQTTAndroid Push Server & MQTT
Android Push Server & MQTT
 
[14.10.20] 아! 그거...모르겠습니다 - TLS(devrookie)
[14.10.20] 아! 그거...모르겠습니다 - TLS(devrookie)[14.10.20] 아! 그거...모르겠습니다 - TLS(devrookie)
[14.10.20] 아! 그거...모르겠습니다 - TLS(devrookie)
 
[20160620]CCTV 구현 자료
[20160620]CCTV 구현 자료[20160620]CCTV 구현 자료
[20160620]CCTV 구현 자료
 

Similaire à Network Project

KGC 2014: 클라이언트 개발자를 위한 컴퓨터 네트워크 기초 배현직
KGC 2014: 클라이언트 개발자를 위한 컴퓨터 네트워크 기초 배현직KGC 2014: 클라이언트 개발자를 위한 컴퓨터 네트워크 기초 배현직
KGC 2014: 클라이언트 개발자를 위한 컴퓨터 네트워크 기초 배현직Hyunjik Bae
 
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...OpenStack Korea Community
 
(C#,네트워크강좌)간단한 TCP 클라이언트/서버 구현, 멀티쓰레드 기반 에코우 클라이언트/서버_C추천#/WPF/자마린실무교육학원
(C#,네트워크강좌)간단한 TCP 클라이언트/서버 구현, 멀티쓰레드 기반 에코우 클라이언트/서버_C추천#/WPF/자마린실무교육학원(C#,네트워크강좌)간단한 TCP 클라이언트/서버 구현, 멀티쓰레드 기반 에코우 클라이언트/서버_C추천#/WPF/자마린실무교육학원
(C#,네트워크강좌)간단한 TCP 클라이언트/서버 구현, 멀티쓰레드 기반 에코우 클라이언트/서버_C추천#/WPF/자마린실무교육학원탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Netmanias L2,L3 Training (1) L2 Ethernet
Netmanias L2,L3 Training (1) L2 EthernetNetmanias L2,L3 Training (1) L2 Ethernet
Netmanias L2,L3 Training (1) L2 EthernetChris Changmo Yoo
 
TCP 연결 과정_Wh apm
TCP 연결 과정_Wh apmTCP 연결 과정_Wh apm
TCP 연결 과정_Wh apm엑셈
 
중급 소켓프로그래밍
중급 소켓프로그래밍중급 소켓프로그래밍
중급 소켓프로그래밍quxn6
 
Python으로 채팅 구현하기
Python으로 채팅 구현하기Python으로 채팅 구현하기
Python으로 채팅 구현하기Tae Young Lee
 
Computing Paradigm - rev1
Computing Paradigm - rev1Computing Paradigm - rev1
Computing Paradigm - rev1Yong Heui Cho
 
Netmanias L2,L3 Training (5) L3 SW Architecture
Netmanias L2,L3 Training (5) L3 SW ArchitectureNetmanias L2,L3 Training (5) L3 SW Architecture
Netmanias L2,L3 Training (5) L3 SW ArchitectureChris Changmo Yoo
 
실무로 배우는 시스템 성능 최적화 10부. 네트워크 모니터링
실무로 배우는 시스템 성능 최적화   10부. 네트워크 모니터링실무로 배우는 시스템 성능 최적화   10부. 네트워크 모니터링
실무로 배우는 시스템 성능 최적화 10부. 네트워크 모니터링Hyunsoo Jung
 
Interface and Protocol
Interface and ProtocolInterface and Protocol
Interface and ProtocolWonjun Hwang
 
네트워크와 인터넷
네트워크와 인터넷네트워크와 인터넷
네트워크와 인터넷Wonjun Hwang
 
Network virtualization for the better understanding of Data Center Network
Network virtualization for the better understanding of Data Center NetworkNetwork virtualization for the better understanding of Data Center Network
Network virtualization for the better understanding of Data Center NetworkInho Kang
 
NAT and Hole Punching_SYS4U I&C
NAT and Hole Punching_SYS4U I&CNAT and Hole Punching_SYS4U I&C
NAT and Hole Punching_SYS4U I&Csys4u
 
Icmp Attak Against Tcp
Icmp Attak Against TcpIcmp Attak Against Tcp
Icmp Attak Against Tcpxyzlee
 
Python socket programming
Python socket programmingPython socket programming
Python socket programmingTae Young Lee
 
컴퓨터공학 스터디 W4 발표: TCP/UDP
컴퓨터공학 스터디 W4 발표: TCP/UDP컴퓨터공학 스터디 W4 발표: TCP/UDP
컴퓨터공학 스터디 W4 발표: TCP/UDPssuser91b87c
 

Similaire à Network Project (20)

KGC 2014: 클라이언트 개발자를 위한 컴퓨터 네트워크 기초 배현직
KGC 2014: 클라이언트 개발자를 위한 컴퓨터 네트워크 기초 배현직KGC 2014: 클라이언트 개발자를 위한 컴퓨터 네트워크 기초 배현직
KGC 2014: 클라이언트 개발자를 위한 컴퓨터 네트워크 기초 배현직
 
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...
 
(C#,네트워크강좌)간단한 TCP 클라이언트/서버 구현, 멀티쓰레드 기반 에코우 클라이언트/서버_C추천#/WPF/자마린실무교육학원
(C#,네트워크강좌)간단한 TCP 클라이언트/서버 구현, 멀티쓰레드 기반 에코우 클라이언트/서버_C추천#/WPF/자마린실무교육학원(C#,네트워크강좌)간단한 TCP 클라이언트/서버 구현, 멀티쓰레드 기반 에코우 클라이언트/서버_C추천#/WPF/자마린실무교육학원
(C#,네트워크강좌)간단한 TCP 클라이언트/서버 구현, 멀티쓰레드 기반 에코우 클라이언트/서버_C추천#/WPF/자마린실무교육학원
 
Netmanias L2,L3 Training (1) L2 Ethernet
Netmanias L2,L3 Training (1) L2 EthernetNetmanias L2,L3 Training (1) L2 Ethernet
Netmanias L2,L3 Training (1) L2 Ethernet
 
Tcpdump
TcpdumpTcpdump
Tcpdump
 
TCP 연결 과정_Wh apm
TCP 연결 과정_Wh apmTCP 연결 과정_Wh apm
TCP 연결 과정_Wh apm
 
중급 소켓프로그래밍
중급 소켓프로그래밍중급 소켓프로그래밍
중급 소켓프로그래밍
 
Python으로 채팅 구현하기
Python으로 채팅 구현하기Python으로 채팅 구현하기
Python으로 채팅 구현하기
 
퀴즈요약
퀴즈요약퀴즈요약
퀴즈요약
 
Computing Paradigm - rev1
Computing Paradigm - rev1Computing Paradigm - rev1
Computing Paradigm - rev1
 
Netmanias L2,L3 Training (5) L3 SW Architecture
Netmanias L2,L3 Training (5) L3 SW ArchitectureNetmanias L2,L3 Training (5) L3 SW Architecture
Netmanias L2,L3 Training (5) L3 SW Architecture
 
실무로 배우는 시스템 성능 최적화 10부. 네트워크 모니터링
실무로 배우는 시스템 성능 최적화   10부. 네트워크 모니터링실무로 배우는 시스템 성능 최적화   10부. 네트워크 모니터링
실무로 배우는 시스템 성능 최적화 10부. 네트워크 모니터링
 
Interface and Protocol
Interface and ProtocolInterface and Protocol
Interface and Protocol
 
네트워크와 인터넷
네트워크와 인터넷네트워크와 인터넷
네트워크와 인터넷
 
Battlemesh(part.2)
Battlemesh(part.2)Battlemesh(part.2)
Battlemesh(part.2)
 
Network virtualization for the better understanding of Data Center Network
Network virtualization for the better understanding of Data Center NetworkNetwork virtualization for the better understanding of Data Center Network
Network virtualization for the better understanding of Data Center Network
 
NAT and Hole Punching_SYS4U I&C
NAT and Hole Punching_SYS4U I&CNAT and Hole Punching_SYS4U I&C
NAT and Hole Punching_SYS4U I&C
 
Icmp Attak Against Tcp
Icmp Attak Against TcpIcmp Attak Against Tcp
Icmp Attak Against Tcp
 
Python socket programming
Python socket programmingPython socket programming
Python socket programming
 
컴퓨터공학 스터디 W4 발표: TCP/UDP
컴퓨터공학 스터디 W4 발표: TCP/UDP컴퓨터공학 스터디 W4 발표: TCP/UDP
컴퓨터공학 스터디 W4 발표: TCP/UDP
 

Network Project

  • 2. C o n t e n t s 01 개요 02 소개 03 코드 설명
  • 3. 개요 • 이름: Network Project(CSMA/CD + IP + TCP) • 개발 인원: 1 • 기간: 2016.09 ~ 2016.12 • 개발 환경: sublime text3, ubuntu • 사용 언어: python • 링크: https://github.com/lights93/network_project
  • 4. 소개 • 네트워크 구조 • router – 파란색 • end_node – 노란색 • port_number – 초록색 • bandwidth – 검은색 오른쪽의 그림과 같은 네트워크를 가정하여 구현했습니다.
  • 5. 소개 • CSMA/CD 구현 내용 • 전송 중인 노드에서 다른 노드의 패킷의 첫 부분이 도착했을 때, collision이 발생한 것을 확인하도록 구현 • CSMA/CD 지속 방식 중에 p-persistent를 이용하여 재충돌 방지
  • 6. 소개 • IP(link state routing protocol) 구현 내용 • 각 router에서 다른 router로 가는 최단 경로를 Dijkstra 알고리즘으로 구하고, routing table 생성 • router들의 연결이 끊어지거나 새로 생길 수 있으므로, 각 router에서 주기적으로 version이 있는 패킷을 보내 자신의 정보를 알리도록 구현
  • 7. 소개 • TCP 구현 내용 • 160bit의 TCP header 구현 • connection establishment process 구현 • connection termination process 구현 • congestion control 구현 • flow control 구현
  • 8. 코드 설명 • 다른 노드로 부터 packet의 시작 부분이 도착했을 때, 현재 노드에서 도 패킷 전송을 하려고 했을 때, collision임을 확인합니다. • collision이 끝났을 때 p-persistent 방식으로 다시 전송을 시도하도록 타이머를 설정했습니다.
  • 9. 코드 설명 • router의 연결이 끊어졌을 때, r_list(라우터 리스트)에서 해당 router를 뺀 뒤, Dijkstra 알고리즘을 사용하여 새로운 router table을 생성합니다. • 새로운 router가 연결됐을 때, r_list(라우터 리스트)에 새로운 router를 추가한 뒤, Dijkstra 알고리즘을 사용하여 새로운 router table을 생성합니다.
  • 10. 코드 설명 • 패킷을 받았을 때 TCP헤더를 확인합니다. ACK, SYN, FIN을 확인하여 받은 패킷을 상황에 맞게 처리합니다.
  • 11. 코드 설명 • 전송하기 전에 받을 노드에 패킷을 저장할 공간이 있는 지 확인합니다. 공간이 없다면 probe 패킷을 보내 공간이 생기는 것을 확인합니다. • timeout으로 재전송할 때는 congestionwindow를 1로 설정하고, duplicated ack로 재전송할 때는 congestionwindow를 threshold +2의 값으로 설정합니다.